Jump to content

What is the best way to start and stop an autoit script at a certain point.


Recommended Posts

I'm somewhat of a newbie. I've written a few autoit scripts but they are fairly basic. Just looking for pixels and clicking on points. Video game automation.

The problem I'm having is that my script will often stop at a certain point. I don't want to rerun the whole thing I want to restart it where it stopped. Because rerunning the whole script won't work anyway its already past a lot of the steps.

But I don't know how to do that. I've considered writing to a .txt file every time it completes a step and then have some sort of checker. 

There has to be a better way to do it. 

Thank you ahead of time.

 

This is my first post here :)

Link to comment
Share on other sites

  • Moderators

@nick050183 Welcome to the forum. First and foremost, please read the forum rules on game automation. You will not receive any help on this subject.

On the broader subject of starting and stopping at certain points, look at Functions (index search Func) in the help file.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@b9k As the OP states he is looking for stopping and starting at different points based on the script completing specific steps, the manual intervention of a Hotkey is not going to be what he is after.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

he didn't say he wants to do that automatically, iBut how does he determine that the script needs to be restarted?

A total restart may not be necessary: I think OP is having a problem where likely something needs to be clicked but the script is stuck waiting for a colored pixel (or some other check) while the button is already there, so the practical solution should be to have a "skip check" hotkey that sets a flag to skip the current check and click anyways, and then he could use that hotkey example to code appropriate start/stop/pause/skip hotkeys needed for the usual game automations, but that is another story.

Ps. Since you are a moderator could you please move this thread to the appropriate category?

Edited by b9k
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...