-1

I've created a script by editing from those scripts I found around about gaming. I'm not even sure if it's 100% effective, but somehow I kind of know what I want.

Is it possible to combine the below 2 scripts into 1 so I don't have to run both scripts simultaneously? If there's any better way to write it down it would really be appreciated. Then I can use it as a guidance and edit.

The below script's loop is supposed to run when I hold the xbutton1.

^s:: suspend
;Script
~$*xbutton1::
Loop           
{
    GetKeyState, var, xbutton1, P
    If var = U
        Break
Send 9
Sleep 10
Send, {0 down}
Sleep 1600
Send, {0 up}
}

The below second script kind of works the same. When I hold the numpad3, it should send a keystroke and immediately push and hold the next one for 2.5 seconds.

^s:: suspend
;Script
~$*Numpad3::
Loop           
{
    GetKeyState, var, Numpad3, P
    If var = U
        Break
Send e
Sleep 10
Send, {9 down}
Sleep 2500
Send, {9 up}
}

I'd really appreciate it if someone combined and simplified it or made it more effective.

1

umm scripts lines should have been one under another.

First script

^s:: suspend
;Script
~$*xbutton1::
Loop
{
    GetKeyState, var, xbutton1, P
    If var = U
        Break
Send 9
Sleep 10
Send, {0 down}
Sleep 1600
Send, {0 up}
}

Second script

^s:: suspend
;Script
~$*xbutton1::
Loop
{
    GetKeyState, var, xbutton1, P
    If var = U
        Break
Send 9
Sleep 10
Send, {0 down}
Sleep 1600
Send, {0 up}
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.