Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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, 12 years ago

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, 12 years ago

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, 12 years ago

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, 12 years ago

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, 12 years ago

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

comment:6 by mlipok, 12 years ago

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, 12 years ago

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.