Modify

#2472 closed Bug (No Bug)

Infinite Loop

Reported by: daved@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

For $k = 1 To 26

MouseClick ("left",500,255,1,0)
For $j = 1 To 26

MouseClick ("left",570,255,1,0)
For $i = 1 To 26

MouseClick("left",670,252,1,0)
MouseClick("left",746,255,1,0)

Next

Next

Next

Code above never stops

Attachments (0)

Change History (7)

comment:1 by mlipok, on Sep 16, 2013 at 8:50:01 AM

how long you wait ?
how fast is your computer ?

try to check this:

For $k = 1 To 26

	MouseClick("left", 500, 255, 1, 0)
	For $j = 1 To 26
		MouseClick("left", 570, 255, 1, 0)
		For $i = 1 To 26
			MouseClick("left", 746, 255, 1, 0)
		Next
		MouseClick("left", 670, 252, 1, 0)
		ConsoleWrite('Loop: $i= ' & $i & @CRLF)
		ConsoleWrite('Loop: $j= ' & $j & @CRLF)
	Next
	ConsoleWrite('Loop: $k=' & $k & @CRLF)
Next

the only thing that is puzzling is basically a "not for the quick action"

but maybe this is normal?

comment:2 by anonymous, on Sep 16, 2013 at 8:58:28 AM

sorry one mistake
this is correct one

For $k = 1 To 26

	MouseClick("left", 500, 255, 1, 0)
	For $j = 1 To 26
		MouseClick("left", 570, 255, 1, 0)
		For $i = 1 To 26
			MouseClick("left", 746, 255, 1, 0)
			MouseClick("left", 670, 252, 1, 0)
			ConsoleWrite('Loop: $i= ' & $i & @CRLF)
		Next
		ConsoleWrite('Loop: $j= ' & $j & @CRLF)
	Next
	ConsoleWrite('Loop: $k=' & $k & @CRLF)
Next

comment:3 by Matt Diesel, on Sep 16, 2013 at 1:48:42 PM

Resolution: No Bug
Status: newclosed

The loop does stop, it just goes very slowly. Just because MouseMove says its "instantaneous" doesn't mean it actually is.

I would say how many mouseclicks you are trying to do, but wolfram won't tell me (http://www.wolframalpha.com/input/?i=26%2B26%5E26%2B2*26%5E26%5E26). The number is too big.

Anyway, adding trace lines shows the loop is progressing.

For $k = 1 To 26
	ConsoleWrite($k & @CRLF)
	MouseClick("left", 500, 255, 1, 0)

	For $j = 1 To 26
		ConsoleWrite($k & "," & $j & @CRLF)
		MouseClick("left", 570, 255, 1, 0)

		For $i = 1 To 26
			ConsoleWrite($k & "," & $j & "," & $i & @CRLF)

			MouseClick("left", 670, 252, 1, 0)
			MouseClick("left", 746, 255, 1, 0)
		Next
	Next
Next

comment:4 by anonymous, on Sep 16, 2013 at 5:49:32 PM

WTF??? Do you know code at all???/ LOL

26*26*26 is the total number of loops/combinations

DUH

It's a BUG

comment:5 by J-Paul Mesnage, on Sep 17, 2013 at 8:27:24 AM

so it is a huge time with the mouseclick() consolewrite() execution
perhaps you overflow the output pane before the end

comment:6 by mlipok, on Sep 17, 2013 at 9:34:00 AM

daved@...

it works super fast
but you must

Change the operation of various AutoIt functions/parameters.

Opt("MouseClickDelay", 0)
Opt("MouseClickDownDelay", 0)

comment:7 by J-Paul Mesnage, on Sep 17, 2013 at 5:08:36 PM

It took me 1080 sec to execute the first post.
It is reduce to 386 sec with mlipok suggestion

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.