So can anyone help me ? I need to restart program when condition is not met ...
Hello forum users!
At some point I had a need to restart my script. Is it possible to do this with autoit or do I need to connect additional scripts like .cmd or .bat?
For example: i have only script.au3 and it's running. Wich code shoud i use to exit from the script and start it again?
I wonder if there is a possibility to do this in Autoit ? I've to make sure that my application is closed properly to prevent crahses / errors
in VB.NET I was able to do it by :
AddHandler Microsoft.Win32.SystemEvents.SessionEnding, AddressOf myfunctions_end_mywork
I found an old example here : but its not working
So I made a loop beginning with while $e = 1. It opens a file and searches for a colour in the file, if the colour isn't there $e = 2 so the loop ends and restarts. Instead of that, the loop runs once and then just stops completely, even if the colour is there.
Here is what it looks like basically.
While $e = 1
$aCoord = PixelSearch ($left, $top, $right, $bottom, 0x3B5E05, 0)
If @error Then $e = 2
How do I make it so the loop restarts if the colour isn't there, but it continues normally if the colour is there?
I want to restart a program, if the window or process closes, the program gets crashed and so on.
I used Runwait in a While loop, that worked so far really good.
Now I got the problem that Windows sometimes does show me this window
it is not excatly that one but looks close to it.
So I want to close that window immidiatly if it appears.