ControlClick with CTRL KEY DOWN

Ask gaming related questions
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: 344
Joined: 24 Aug 2015, 12:56
Facebook: https://fb.me/YoucefHamDz
Google: [email protected]
GitHub: YoucefHam
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”

Who is online

Users browsing this forum: No registered users and 48 guests