Zigloo Posted October 12, 2005 Share Posted October 12, 2005 Hi all :"> ,My problem is very simple !Let's see the following script :Run("notepad.exe")Dim $Title = "Sans titre - Bloc-notes"WinWait($Title)WinActivate($Title)Send("!FQ")When I execute it on screen, it works fine : it opens notepad (in french version ) and then close it ! Nothing's difficult at all, no ?When I create a scheduled task associated with the user I am logged on, and execute it, it does the same thing... And I can see Notepad opening and then closing ! We can see that it works fine... but that's not a real batch mode !But when I execute the same scheduled task associated with another user (which is also administrator of the computer), I see nothing (that's nice), the scheduled task starts and finishes but notepad stay open ! I see it with the Task Manager, I can kill it with a tool (Kill.exe) but I think that the Send function has never sent the two keys (Alt-F and Q) to my notepad window ! How sending those keys in that batch mode !!!That's it... Thanks in advance for your many responses... I'm happy because I'm going to learn something !Bye Link to comment Share on other sites More sharing options...
Zigloo Posted October 12, 2005 Author Share Posted October 12, 2005 !Excuse-me but if my problem was "How can I close a window ?", I just have to do :WinClose($Title)The problem is : How can I send keys to a window in batch mode ?Your answer Valuater was not the good answer ! Is there another player ? Link to comment Share on other sites More sharing options...
BigDod Posted October 12, 2005 Share Posted October 12, 2005 !Excuse-me but if my problem was "How can I close a window ?", I just have to do :The problem is : How can I send keys to a window in batch mode ?Your answer Valuater was not the good answer ! Is there another player ? You could try using ControlSend you can read about it in the help files.BTWThis is not a support forum (see top of page) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Zigloo Posted October 14, 2005 Author Share Posted October 14, 2005 Well, BigDod, thank's for your answer, but I've tried too this function and it doesn't work better... It's the same problem... Notepad stay open and I can read yhe documentation and yhe help files many times, it stay opened !!!I know this is not a support forum nor an helpdesk ! I think it's a community of users ! If my purposes have blessed you, excuse me ! But how can I do with my problem ! Nobody can answer me, nobody use AutoIt to do batch works ! I can beleave that !!! So, what ??? Link to comment Share on other sites More sharing options...
Confuzzled Posted October 14, 2005 Share Posted October 14, 2005 (edited) Um, I'm not sure what you mean by the term 'batch mode' in the context of making an AutoIT script (English is my first language). Is your program actually allowed to run from scheduler?Somebody was discussing what appears to be exactly this same problem elsewhere in the last day or two, and I recollect it had to do with the Windows scheduler and security/logons, rather than anything with AutoIT. It may pay to do a forum search on scheduler and see what comes up.PS: You posted your question in the wrong part of the forums - that is why BigDod mentioned it.Send("!FQ")You're kidding me aren't you? Edited October 14, 2005 by Confuzzled Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now