Sign in to follow this  
Followers 0
King

Help please. (no idea what topic to put it in)

7 posts in this topic

HotKeySet("^!z","Movment");^!z is Ctrl+Alt+'z' to run the Movment
HotKeySet("^!x","End");^!x is Ctrl+Alt+'x' to close the Movment
While 1
    Sleep(100)
WEnd
Func Movment()
    While 1
        Sleep(60000)
        Send("{SPACE}")
    WEnd
EndFunc
Func End()
    Exit
EndFunc

Ok what i am trying to do is get it to press "space" key every 60 seconds.

Here is the thing. Every time i compile it and open it. the script pauses???

or does nothing at all.

Am i missing somthing? Somone coded this for me i have no idea about code. If this was a 1982 chevy i could rebuild the engine on it.

=-)

Share this post


Link to post
Share on other sites



Here is the thing. Every time i compile it and open it. the script pauses???

or does nothing at all.

According to your code this is exactly what it should be doing. Once it is running, pressing Ctrl-Alt-Z will enter an infinite loop of waiting 60 seconds and pressing Spacebar, and Ctrl-Alt-X will shut down the script. Works fine for me.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

According to your code this is exactly what it should be doing. Once it is running, pressing Ctrl-Alt-Z will enter an infinite loop of waiting 60 seconds and pressing Spacebar, and Ctrl-Alt-X will shut down the script. Works fine for me.

Sorry i posted the wrong script.

HotKeySet("^!z","Movment");^!z is Ctrl+Alt+'z' to run the Movment
HotKeySet("^!x","End");^!x is Ctrl+Alt+'x' to close the Movment
While 1
    Sleep(100)
WEnd
Func Movment()
    While 1
        Sleep(60000)
        Send("{SPACE}")
    Sleep(60100)
    Send("{/}")
    WEnd
EndFunc
Func End()
    Exit
EndFunc

the jumping works but not the / part. ( i am getting info from my brother and relaying it as well so please bare with me.)

Edited by King

Share this post


Link to post
Share on other sites

While I don't know whether the timing is correct for what you're doing, the slash should not be in curly brackets. Those are only needed for special keys like {F1} or {ALT}.

Share this post


Link to post
Share on other sites

While I don't know whether the timing is correct for what you're doing, the slash should not be in curly brackets. Those are only needed for special keys like {F1} or {ALT}.

62000 would be 2 seconds after right?

Share this post


Link to post
Share on other sites

Assuming you are referring to replacing the 60100 in your above script with a 6200, then no, it wouldn't. You would be sleeping for 60 seconds, sending a space, sleeping for another 62 seconds, and sending a slash. If you want to send a slash 2 seconds after sending the space, you would use 2000, not 62000.

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