Hello,
I am trying to make a litlle scirpt, but I need help.
I want that holding right mouse would HOLD RIGHT MOUSE and HOLD LEFT SHIFT after some delay. And then I stop holding right mouse the script would end.
I try doing something like this:
*RButton::Send {RButton down}{LShift down}
But it doesnt work very good. Can you help me?
Need help on a script
Re: Need help on a cript
Try:
*RButton::
Send {RButton down}{LShift down}
KeyWait, RButton
Send {RButton up}{LShift up}
return
*RButton::
Send {RButton down}{LShift down}
KeyWait, RButton
Send {RButton up}{LShift up}
return
Re: Need help on a cript
Hallo,
in a similar way but with delay:without delay, it is a little shorter:
in a similar way but with delay:
Code: Select all
~*RButton:: ;holding right mouse would HOLD RIGHT MOUSE
Sleep, 500 ;500 ms delay
Send, {LShift down} ;HOLD LEFT SHIFT after some delay
KeyWait, RButton ;And then I stop holding right mouse
Send, {LShift up}
Return ;the thread (not the script) would end.
Code: Select all
~RButton::LShift
Re: Need help on a cript
Thank you. This is working very well. I wanted it for PUBG game so that I could automatically hold breath while aimingRohwedder wrote:Hallo,
in a similar way but with delay:without delay, it is a little shorter:Code: Select all
~*RButton:: ;holding right mouse would HOLD RIGHT MOUSE Sleep, 500 ;500 ms delay Send, {LShift down} ;HOLD LEFT SHIFT after some delay KeyWait, RButton ;And then I stop holding right mouse Send, {LShift up} Return ;the thread (not the script) would end.
Code: Select all
~RButton::LShift
Who is online
Users browsing this forum: No registered users and 44 guests