Random sleep timers and mouse positions are ignored

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Brunoire
Posts: 34
Joined: 25 Jun 2017, 16:44

Random sleep timers and mouse positions are ignored

29 Jun 2017, 12:58

When I press ctrl+alt+m, the input boxes are working fine no matter what I send to the script like, do the right number of loops and wait the exact minutes but afterwards it goes on crazy speed like 1ms and the mouse clicks are always on the same position and not random.
Spoiler
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: Random sleep timers and mouse positions are ignored

29 Jun 2017, 13:06

This may not answer your question. But two mistakes are jumping out at me:

One: All those Randoms you set are not executed. Your F12 hotkey is in the way. The series of Randoms are not in the auto-execute section. So those variables are treated as null (0).

Two: These commands aren't wrapped in a block.

Code: Select all

	Else
                { ; missing
		min := wait * 60000
		Sleep, %min%
                } ; missing
	Return
Your code is extensive, and it's great you've shared all that. It'll take a while to go through it and screen for other mistakes. I don't plan to go into it as of now; hopefully someone else swings by and points out things that may need changing.
Brunoire
Posts: 34
Joined: 25 Jun 2017, 16:44

Re: Random sleep timers and mouse positions are ignored

29 Jun 2017, 14:42

I finally fixed it by making a random sleep command instead of using random.

Before

Code: Select all

Sleep, %a%

Random, a, 5000,7000
After

Code: Select all

rsleep(5000, 7000)

rsleep(min, max) {
sleep % rand(min, max)
}
Return
Peared
Posts: 12
Joined: 02 Dec 2015, 12:32

Re: Random sleep timers and mouse positions are ignored

29 Jun 2017, 15:28

Code: Select all

^!m::

Inputbox, number, Quest, Repetir quantas vezes (1-5)?
If (number < 1 || loop > 5)  ; <--  loop  should not be here 
Return

Code: Select all

^!e::
Inputbox, number, Event, Repetir quantas vezes (1-5)?.
	If (number < 1 || number > 5)   ; [1] is only possible input number that does not end in return,  numbers [2-5] will break thread. 
		Return
	Else
		Goto, eve%number%  ; ------------------ 
	Return

Inputbox, number, Raid, Repetir quantas vezes (1-5)?
	If (number < 1 || number > 5)   ;   [1] same as the other [2-5] Non existing Goto, raid%number% 
		Return
	Else
		Goto, raid%number%  ;-----------------------------
	Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Google [Bot] and 248 guests