Jump to content

What command to use to wait for process


pokerbot
 Share

Recommended Posts

Hi guys,

Great forum here, I am totally new to AutoIT though so I hope I can get some help here and later on also be able to help others.

I find it a bit hard to use the search function when I have multiple keywords I want to search for in the same subject, for instance the following question I have I would like to search on: wait function process started, but then I get so many threads where all threads only use one word of my key phrase, is there a smarter way to do this so I don't have to ask too many for you guys probably simple questions.

Hope someone can help me out with this one: To wait for an existence of a window I use WinWaitActive(), but what AutoIT command can I use to wait for a process (executable started)?

Kind regards,

Pokerbot :)

Link to comment
Share on other sites

Your are on a good start with WinWaitActive().

But don't forget to search the help-file as well!

Goto the help-file -> Function Reference -> Process Management.

Then look for: ProcessExists("process") (Or PID instead of processname)

You could loop for example:

Do
      $process = ProcessExists("processname.exe")
Until $process = 0 ; Until process is gone

Or

Do
      Sleep(50); I prefer to sleep to get processor usage down from 100% :)
Until ProcessExists("processname.exe") = 0 ; Until process is gone

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

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