Sign in to follow this  
Followers 0
chaddiablo

Process close/open

4 posts in this topic

Hi im trying 2 make a loop where when a certain process closes, it turns it back on after a certain amount of time.

This is as far as i got.

If ProcessClose("Game")
    Then

lol

Share this post


Link to post
Share on other sites



Well, first off ProcessClose is a command to close the process, not to check if it's closed, so that line won't help you.

You'll want to check if the process is still open, instead:

ProcessExists("Game")

And loop it, so when the game is closed, autoit will know that it doesn't exist anymore, which is the same thing.

Then you can carry out whatever functions you want from there,

An example of waiting for a game to close:

Do

Sleep(1000)

Until Not(ProcessExists("Game"))


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

Aight ill try that thanks

Share this post


Link to post
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
Sign in to follow this  
Followers 0