Help with a script that randomly clicks at random coordinates

Get help with using AutoHotkey and its commands and hotkeys
yessir3
Posts: 19
Joined: 01 Oct 2017, 16:33

Help with a script that randomly clicks at random coordinates

23 May 2020, 22:33

Can someone help me with a script that will click at random times and also at random coordinates on the screen?

Right now all I have is this, not sure if I'm on the right path

Code: Select all

 toggle=0 
    ALT::
    If (toggle := !toggle)
    	SetTimer, Timer, -1
    return
     
    timer:
    while toggle
    {
    	Click
    	Random, Time, 5800, 6400
        Sleep, Time
    }
    return
[Mod edit: [code][/code] tags added]
Rohwedder
Posts: 2896
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help with a script that randomly clicks at random coordinates

Yesterday, 00:00

Hallo,
try:

Code: Select all

toggle=0
ALT::
If (toggle := !toggle)
	SetTimer, Timer, -1
return
Timer:
IF !toggle
	Return
Random, Time, 5800, 6400
SetTimer, Timer,% -Time
Random, X, 100, 500
Random, Y, 100, 500
Click, %X%, %Y%
return

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, dtsmarin2, pasqualedk, Rohwedder, VIJJU and 80 guests