~y::
send, {F3}
sleep, 100
send, {F9}
sleep, 20
send, {F10}
sleep, 300
send, {F3}
This is how it looks right now and it works well, but I would like to add additional functionality to it. This might be over the top and actually not possible, but I would like it to do the following:
IF I just click the Y button normally then that is what happens. But if I should press and HOLD the Y button then I want the following to happen:
send, {F3}
sleep, 100
send, {F9}
(These are a given at this point, they will always be in the start no matter what.)
The difference is that the following part should start looping after the initial 3 lines:
sleep, 20
send, {F10}
I want This part repeated until I release button Y, at which point it should stop sending F10 (and that sleep, 20 command). Also at the release of the Y button it should also press {F3} one last time after an additional sleep, 50 command.
To reiterate, I need it to also have the full script thing as posted at the start if I only click the Y button quickly and not holding it in.
So is it possible to have 2 different functions on a hotkey depending on whether you click it or hold it in? And if so, could you help in how I should approach making this script?
Complicated double function hotkey script help
Re: Complicated double function hotkey script help
Something like this?
Code: Select all
Y::
Sleep, 100
send, {F3}
sleep, 100
send, {F9}
loop
{
sleep, 20
send, {F10}
GetKeyState, state, Y, P
if state = U
break
}
sleep, 300
send, {F3}
Sleep, 300
return
Re: Complicated double function hotkey script help
That's so damn good!! It works exactly as I intended, I am so grateful. Thanks
Who is online
Users browsing this forum: Stpham and 64 guests