Jump to content

pause script and reload in place-restart from line at which paused


Recommended Posts

K, so Bozwell here,

Hoping someone can help me with this (perhaps painfully obvious) question.

I have been using AutoIt to script an mmorpg bot. I am not Gold farming or doing anything nefarious, just experimenting with how to refine the bots' interaction with its environment using color and pattern recognition as well as experimenting with motion detection. My scripts are becoming long and they take time to execute as the bot makes its way through the virtual world. Right now if I see the bot doing something wrong and I want to refine its behavior I have to pause, using this func ( not the tray):

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(100)

ToolTip("Script is Paused", 1, 1)

WEnd

ToolTip("")

EndFunc ;==>TogglePause

Then I rewrite the section of script in question, BUT, I have to return to the start point to see the result. I can't seem to find a way to reload the rewritten script and begin again in place at the point (line) in the script where I paused. Is it possible to do this using existing AutoIt functionality? Might it be possible to do it with a user defined function? Am I SOL? Missing something obvious? Is anyone else trying something similar? Thanks for your interest/input :~),

Boz

PS There is this:

;Func Reload()

; $AutoIt3Path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")

; $ToRun1 = '"' & $AutoIt3Path & '\AutoIt3.exe "' & ' "' & @ScriptFullPath & '"'

; Run($ToRun1)

; Exit 0

;EndFunc ;==>Reload

However, even IF it can piggyback the pause function, it still restarts from line 1.

PPS I didn't realize this topic was Verboten. Please feel free to delete post, Don't flame me, Thanks.

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