How to add control click on this script

Ask gaming related questions (AHK v1.1 and older)
Faxxed
Posts: 5
Joined: 07 Mar 2019, 17:34

How to add control click on this script

09 Mar 2019, 08:43

i found this script while i was browsing ahk and it works on roblox
Now my problem is since im like 2 days old at ahk i dunno how to make a targeted window script or any script
I know control click but i dont know how to do it
so here is the code Credits to:LorenzoMKV

;
toggle := 0
;
startTime := 0
return

*F8::
toggle := !toggle
if (toggle = 1){
TTOn("Autoclicker running")
startTime := A_TickCount
GoSub, Clicker
}else{
TTOn("Autoclicker off")
}
return

Clicker:
Click
Sleep, % Rand(138,249)
if ((A_TickCount - startTime) > Rand(28,36)*1000){
Sleep, 100
SendInput, {F1}
Loop, % Rand(2,5)
{
Click
Sleep, % Rand(117,210)
}
Sleep, 100
SendInput, {F1}
startTime := A_TickCount
}
If (toggle = true)
SetTimer, Clicker, -1
return

Rand(min,max){
Random, result, % min, % max
return result
}

TTOn(msg){
ToolTip, % msg
SetTimer, TTOff, -2000
Return
}

TTOff(){
ToolTip
return
}
kyuuuri
Posts: 340
Joined: 09 Jan 2016, 19:20

Re: How to add control click on this script

10 Mar 2019, 23:16

Please use [.code] [./code] when showing your script, it makes it easier to read.
This is what docs say about ControlClick:
ControlClick , Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText
If you need it to click the current window where the mouse is then you can do the following:
ControlClick , , A
If you want it to click an specific window you need to replace "A" with a WinTitle parameter (read the docs, there is a lot of ways to use it).
If you want it to click an specific control then you will need to use winspy and get the name of the control.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 69 guests