How to get keywait work for rbutton twice? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
emanate22
Posts: 52
Joined: 11 May 2021, 00:03

How to get keywait work for rbutton twice?

22 Jun 2021, 22:52

This script is not working without ;sleep,100. But it should work. Even with the sleep100. It also always skips the second right-click step and directly releases shift. Is it because keywait does not support right-clicking twice? I try #MaxThreadsPerHotkey it does nt help.

Code: Select all

!s::
MouseGetPos,xpos,ypos
SendInput {Shift down}
mouseclick,left,861,958
mouseclick,left,916,949
MouseMove,xpos,ypos
Keywait,Rbutton,d
MouseGetPos,xpos,ypos
mouseclick,left,972,950
mouseclick,left,1029,947
MouseMove,xpos,ypos
;sleep,100
Keywait,Rbutton,d
sleep,10
SendInput {Shift up}
return
User avatar
boiler
Posts: 16927
Joined: 21 Dec 2014, 02:44

Re: How to get keywait work for rbutton twice?  Topic is solved

22 Jun 2021, 23:39

In between the two Keywait, RButton, D statements, use a KeyWait, RButton to wait for it to be released before checking to see if it’s down again.
emanate22
Posts: 52
Joined: 11 May 2021, 00:03

Re: How to get keywait work for rbutton twice?

24 Jun 2021, 04:39

boiler wrote:
22 Jun 2021, 23:39
In between the two Keywait, RButton, D statements, use a KeyWait, RButton to wait for it to be released before checking to see if it’s down again.
Thank you so mush it works perfectly now

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CrowexBR, doodles333, vysmaty and 242 guests