Need help with random sleep time

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
21129812

Need help with random sleep time

14 Oct 2018, 02:11

So i need help with this code
XButton1::
Toggle := !Toggle
While Toggle{
Click
sleep 60
}
return

So what it does is click 10-11 cps constantly and im looking to randomize it a bit more but not too much
what i would like it to do is click maybe like 10-11 then like maybe ever 3 seconds go down to 8-9 then back up to 10-11.
If anyone could help me with this it would mean a lot!. Thanks for your time
User avatar
tonkomnom
Posts: 37
Joined: 25 Jul 2018, 02:53
Contact:

Re: Need help with random sleep time

14 Oct 2018, 04:31

This could work, did not want to try it out because of all those clicks. :lol:

Code: Select all

#SingleInstance, force

Loop
	{
		vsleep = 60
		Sleep, 3000
		vsleep = 120
		Sleep, 3000
	}

XButton1::
Toggle := !Toggle
While Toggle{
Click
Sleep %vsleep% 
} 
return
User avatar
tonkomnom
Posts: 37
Joined: 25 Jul 2018, 02:53
Contact:

Re: Need help with random sleep time

14 Oct 2018, 04:36

Even more random would be:

Code: Select all

#Persistent
#SingleInstance, force

Loop
	{
		Random, vsleepclick, 60, 120
		Random, vsleep, 2000, 4000
		Sleep, %vsleep%
	}

XButton1::
Toggle := !Toggle
While Toggle{
Click
sleep %vsleepclick% 
} 
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: dra3th, Google [Bot], Mateusz53, Rohwedder, Spawnova and 270 guests