Jump to content

need a lil help with super easy autoit program


supag
 Share

Recommended Posts

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
Link to comment
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")
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...