Jump to content

need help running files with script


Recommended Posts

how can I wait for a process to exit but still let the script to run so I can exit the script even when a program is running.

I am trying to make a script that will run scanner software that will check for viruses and maleware and clean the hdd one at a time but allow me to close the app if it is taking to long and move on to the next one and also let me exit at any time?

Any ideas?

Link to comment
Share on other sites

allow me to close the app if it is taking too long

If you can define 'too long' you could start the program with a run command, and then use ProcessWaitClose to wait until it has finished, and just put the timeout value in as the last argument.

William

Link to comment
Share on other sites

I would think a hotkeyset would be the best route to go because too long usually depends on mood. Sometimes too long could be a few minutes, sometimes an entire day.

Implementing the hotkey to skip a process depends on how you set up the script, but I would think the function would work something like

Func _skip($process)

processclose($process)

EndFunc

Your script would probably have a runwait for each section it needs to run, so when the process exits, the script knows to move on to the next

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

I would think a hotkeyset would be the best route to go because too long usually depends on mood. Sometimes too long could be a few minutes, sometimes an entire day.

Implementing the hotkey to skip a process depends on how you set up the script, but I would think the function would work something like

Func _skip($process)

processclose($process)

EndFunc

Your script would probably have a runwait for each section it needs to run, so when the process exits, the script knows to move on to the next

Doesnt runwait pause the script so I cant do anything tell the runwait is over?

Link to comment
Share on other sites

I think there is something with hotkey (and maybe onevent) that allows it to interrupt. If it can't interrupt the runwait, then you can use some other method to "pause" the script. I usually use a pixelsearch or pixelgetcolor on a spot I know is going to change when the app is finished.

I put the search in a loop that does a small sleep(10) until the color is found (or not found)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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...