ControlClick with CTRL KEY DOWN

Ask gaming related questions (AHK v1.1 and older)
danielfgpontes
Posts: 5
Joined: 06 Sep 2019, 14:35

ControlClick with CTRL KEY DOWN

16 Sep 2019, 00:33

Hello all.

I'm trying to make a script that send the CTRL key down, in a background window, then send a ControlClick(With CTRL down) then release the CTRL key, I've tried this:

Code: Select all

ControlSend, {Ctrl Down}, ahk_id %CO_id%
ControlClick, x909 y252, ahk_id %CO_id%,, left
ControlSend, {Ctrl Up}, ahk_id %CO_id%
But the CTRL key doesn't go down, only the click work

If I try this:

Code: Select all

ControlSend, {Ctrl Down}, ahk_id %CO_id%
Sleep, 1000
ControlSend, {Ctrl Up}, ahk_id %CO_id%
The CTRL key works, but I can't find a way to work with both commands at the same time.
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: ControlClick with CTRL KEY DOWN

25 Sep 2019, 11:13

try this

Code: Select all

ControlSend, {Ctrl Down}, ahk_id %CO_id%
Sleep, 120
ControlClick, x909 y252, ahk_id %CO_id%,, left
Sleep, 1000
ControlSend, {Ctrl Up}, ahk_id %CO_id%
:wave: There is always more than one way to solve a problem. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Shoobis and 93 guests