How to add ctrl+click in DllCall?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zerox
Posts: 77
Joined: 15 Apr 2021, 13:01

How to add ctrl+click in DllCall?

Post by zerox » 31 Jan 2023, 21:08

Hello, so there is the code, and i want add +ctrl for [1455, 713]. So just ctrl + click [1455, 713]. Only for this one. Thank you so much for any help!

Code: Select all

NumpadEnter::

For each, coord in [[900, 800], [831, 1056], [1455, 713]] {
 move(coord.1, coord.2), DllCall("mouse_event", "UInt", LBDN := 2)
 Sleep, 25 ; Milliseconds after button down
 DllCall("mouse_event", "UInt", LBUP := 4)
 Sleep, 25 ; Milliseconds after button up
}

Return

move(x, y) { 
 
 Static SysX := 65535 / A_ScreenWidth, SysY := 65535 / A_ScreenHeight
 WinGetPos, winX, winY,,, A
 DllCall("mouse_event", "UInt", ABSMOVE := 32769, "UInt", (x + winX) * SysX, "UInt", (y + winY) * SysY)
}

Return to “Ask for Help (v1)”