ControlClick not working on inactive Chrome tab

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Avastgard
Posts: 133
Joined: 30 Sep 2016, 21:54

ControlClick not working on inactive Chrome tab

16 Dec 2018, 15:48

I wrote a script to automatically click on certain areas of a chrome tab while working on something else. The script works, but only when the tab is on focus. Clicking on another tab will prevent the script to keep clicking.

Could somebody take a look and tell me what's wrong?

Code: Select all

#SingleInstance Force

#If GetKeyState("Capslock", "T")
^]:: 
settimer, Repeater, 2000
GoSub, Repeater
Return

^[:: settimer, Repeater, off
#If

Repeater:
If GetKeyState("Capslock", "T")
{
SetControlDelay -1
ControlClick, x1266 y579, WindowTitle,,,, NA,,
Sleep, 300
SetControlDelay -1
ControlClick, x1417 y483, WindowTitle,,,, NA,,
Sleep, 300
SetControlDelay -1
ControlClick, x912 y284, WindowTitle,,,, NA,, 
}

else

{
settimer, Repeater, off
}

Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Rohwedder, Scr1pter and 137 guests