Sign in to follow this  
Followers 0
VII

Problems with pause

2 posts in this topic

Hello, new to AutoIt. Hopefully someone can help me with this. When I leave my client window, and move to another program, the Autoit pauses, but when I comeback it won't unpause. It appears to be unpaused, but the original client that I'm using the AutoIt for, it won't unpause there. But I can tell it is still active when I go to type in other areas.

HotKeySet("{v}","jump")
HotKeySet("{PAUSE}", "unbind")

func jump() ; normal jump
    HotKeySet("{v}")
    Send("{0}")
    Sleep(1600)
    Send ("{w down}")
    Sleep(70)
    Send("{space}")
    Send("{w up}")
    HotKeySet("{v}", "jump")
    idle()
EndFunc

Func idle(); idle, do nothing
    while 1
        Sleep (1000)
    WEnd
EndFunc


Func unbind(); unbind keys
    HotKeySet("{v}")
    HotKeySet("{PAUSE}", "unbind")
    idle()
EndFunc

Func rebind() ; rebind keys
    HotKeySet("{v}", "jump")
    HotKeySet("{PAUSE}", "rebind")
    idle()
EndFunc


 idle()

Thanks, VII

Share this post


Link to post
Share on other sites



A couple of notes.

I don't think you need to re-define your hotkeys in each func

(func jump() -> HotKeySet("{v}", "jump")) The only way to call the function is when your hotkey "v" is set to jump.

When you pause the program (call unbind) it resets the hotkey "v" and resets pause to what it already is set at.

I don't see where rebind is ever called to reset "v" back to pause either.


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!

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