I am currently totally failing on a simple thing:
I am in the telegram desktop app and am interacting with a bot, where I want each 5 minutes to click the "claim" button presented by the bot.
so I did my thing down there but it doesnt seem to work.
got ahk_class and ahk_id with windows spy, so it should be legit.
same for the coordinates, they are literally in the middle of the damn button.
but no matter which controlclick I use, it doesnt seem to do anything.
the tooltips show up at the expected time too, so the script doesnt seem to encounter any error.
it jsut simply doesnt work, no idea if the click isnt performed or if for whatever reason telegram doesnt register the clicks or ignores them.
I am using controlclick isntead of nomral click or send event cause I want the button to be clicke whent he telegram window is minimized in the background, so I can do my normals tuff in the foreground.
any idea why this might not work?
Code: Select all
SetControlDelay -1
time:=0
while true{
ControlClick,1118 900,ahk_ip 88984,,Left,1,D NA Pos,
ControlClick,1118 900,ahk_class Qt5152QWindowIcon,,Left,1,D NA Pos,
Tooltip, button down
Sleep, 500
ControlClick,1118 900,ahk_ip 88984,,Left,1,U NA Pos,
ControlClick,1118 900,ahk_class Qt5152QWindowIcon,,Left,1,U NA Pos,
Tooltip, button up
ControlClick,1118 900,ahk_class Qt5152QWindowIcon,
Random, time,300000,501000
sleep, time
}