Sign in to follow this  
Followers 0
supag

need a lil help with super easy autoit program

4 posts in this topic

#1 ·  Posted (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 by supag

Share this post


Link to post
Share on other sites



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")

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0