Jump to content

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


King
 Share

Recommended Posts

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.

=-)

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
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.

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...