How to stop this immediately when I release the botton?

Ask gaming related questions (AHK v1.1 and older)
carloskaine
Posts: 6
Joined: 24 Mar 2018, 06:17

How to stop this immediately when I release the botton?

06 Apr 2018, 21:40

$C::
SetTimer, F_Break, 500
If GetKeyState("C", "P")
{
Send, 3
Sleep 100
Send, {4 Down}
Sleep, 2100
Send, {4 Up}{Shift Down}
Click
Send, {Shift Up}{4 Down}
Sleep, 2100
Send, {4 Up}
}
return
Guest535

Re: How to stop this immediately when I release the botton?

06 Apr 2018, 22:17

It's very crude but you could try placing something like:

Code: Select all

If GetKeyState("C", "P") = False
Return ; note that single line if statements don't require braces
Between each step of your original code; also break down your large "Sleep, 2100" lines into, for example, 7 individual "Sleep, 300" lines. You may also want to break down your Send commands in a similar way, if you attempt this.

I'm positive there's a better way but I imagine this will work for your purposes, given your script isn't lengthy.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 98 guests