AutoIt Detecting when Road Runner closes
I have a script that poll's RR for information. I have multiple checks in the script like the following:
if ProcessExists("RoadRunner.exe") = 0 Then Exit
I have this the line above all lines that poll info from RR.
The problem, is when RR closes, The Road Runner.exe process can remain in the task list for up to 4 seconds. Thus, I get a nasty error from the script that the object has failed when I close Road Runner. (The window handle also remains active till RR completely shuts down, I tried that as well)
The script polls information every 1 second, and I do not want to have to put a wait for 5 seconds before it polls info from RR.
Is there another way, with AutoIt to more reliably tell when RR is closed or in the process of closing?
I did find this:
Which disables error reporting, but only on run & wait commands, and not other types of errors.
The script is pretty straight forward, and solid, so I am not opposed to turning off errors completely for the script, if someone knows how.