supag Posted August 12, 2008 Share Posted August 12, 2008 (edited) here is what i have so far, but it ends up lagging out and killing the cpu. also i need it to loop forever If WinExists("AO.exe") Then \\i want it to constantly search for when this program finally pops up WinKill("AO.exe", "") \\then i need it to kill the program wait(10000) Run("C:\Desktop\AO.exe", "") \\then i need it to run the program again. Wait(3000) Send("^s") EndIf basically i have this buggy program that ends up getting an error message so im having autoit close the error message then reload the program. thank you for the help. Edited August 12, 2008 by supag Link to comment Share on other sites More sharing options...
Nahuel Posted August 12, 2008 Share Posted August 12, 2008 I don't get it... is AO.exe a process or a window title? Try being clearer. Is this close to what you want? Do Sleep(50) Until ProcessExists("AO.exe") ProcessClose("AO.exe") ProcessWaitClose("AO.exe") Run("C:\Desktop\AO.exe") WinWaitActive("NAME OF WINDOW") ;Replace here with the exact name of the window that popups Send("^s") Link to comment Share on other sites More sharing options...
supag Posted August 12, 2008 Author Share Posted August 12, 2008 I don't get it... is AO.exe a process or a window title? Try being clearer. Is this close to what you want? Do Sleep(50) Until ProcessExists("AO.exe") ProcessClose("AO.exe") ProcessWaitClose("AO.exe") Run("C:\Desktop\AO.exe") WinWaitActive("NAME OF WINDOW") ;Replace here with the exact name of the window that popups Send("^s") gonna try it right now. I'm running the program ao.exe and after 30min sometimes an hour; i never really know; the program has a windows error msg pop up saying click here to debug or whatever and the title of that windows error msg that pops up is "AO.exe". when i actually run ao.exe that programs window title is only "AO" so im able to search for "AO.exe"(which is the windows error window) because the actual program window title is only "AO" does that make any sense to you? its a lil confusing to follow Link to comment Share on other sites More sharing options...
supag Posted August 12, 2008 Author Share Posted August 12, 2008 Im using ur program but changed the first 3 lines to WinExisits and WinClose and WinWaitClose, because i need it to go by title name not process. hopefully it will work out 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