Airwolf Posted August 2, 2006 Share Posted August 2, 2006 Here is my code: Do RunWait("C:\UE\leafinstall.exe") WinWait("C:\WINDOWS\system32\cmd.exe","") If Not WinActive("C:\WINDOWS\system32\cmd.exe","") Then WinActivate("C:\WINDOWS\system32\cmd.exe","") WinWaitActive("C:\WINDOWS\system32\cmd.exe","") WinWaitClose("C:\WINDOWS\system32\cmd.exe") Until ProcessExists("UEAgent.exe") For some reason, it doesn't seem like this loop is ever happening, it doesn't ever run leafinstall.exe. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 2, 2006 Share Posted August 2, 2006 Hi, RunWait waits until the command is done. Try Run instead of RunWait. Same to WinWait. Try to set a timeout. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Airwolf Posted August 2, 2006 Author Share Posted August 2, 2006 Hi,RunWait waits until the command is done. Try Run instead of RunWait.Same to WinWait. Try to set a timeout.So long,MegaI want it to do a RunWait, leafinstall.exe is 2 lines, one calls a vbs script in a command window, the other exits afterward. Setting the timeout on the WinWait won't do anything either. It is never opening leafinstall and I know that the ueagent.exe process does not exist. I think the problem is with my Do Until statement. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 2, 2006 Share Posted August 2, 2006 HI, what about doing it it step by step without loop for testing. Just remove the loop statement and place some MsgBox or ConsoleWrite commands between the steps. Then you'll see how far you get. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Airwolf Posted August 2, 2006 Author Share Posted August 2, 2006 HI, what about doing it it step by step without loop for testing. Just remove the loop statement and place some MsgBox or ConsoleWrite commands between the steps. Then you'll see how far you get. So long, Mega I know that the script works if I just do the lines within the Do Until statement. If I only run RunWait("C:\UE\leafinstall.exe") WinWait("C:\WINDOWS\system32\cmd.exe","") If Not WinActive("C:\WINDOWS\system32\cmd.exe","") Then WinActivate("C:\WINDOWS\system32\cmd.exe","") WinWaitActive("C:\WINDOWS\system32\cmd.exe","") WinWaitClose("C:\WINDOWS\system32\cmd.exe") Then it works fine. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 2, 2006 Share Posted August 2, 2006 Hi, it is too late. I cannot think clearly anymore. What if you try something absolutely like While 1 While Not ProcessExists("bla.exe") ;Your code WEnd If ProcessExists("bla.exe") Then Exit (0) WEnd So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 2, 2006 Moderators Share Posted August 2, 2006 Hi, it is too late. I cannot think clearly anymore. What if you try something absolutely like While 1 While Not ProcessExists("bla.exe") ;Your code WEnd If ProcessExists("bla.exe") Then Exit (0) WEnd oÝ÷ Ù*%¢xz¿ªê-y8Z·ljÖçnÖ§µ«¢+Ù]¡¥±Ä(%]¡¥±9½ÐAɽÍÍá¥ÍÑÌ ÅÕ½Ðí±¹áÅÕ½Ðì¤($$íe½ÕȽ(%]¹(%á¥ÐÀí%AɽÍÍá¥ÍÑÌ ÅÕ½Ðí±¹áÅÕ½Ðì¤Q¡¸á¥Ð À¤)]¹If your at that line, you already know it exists. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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