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

Change History (7)

comment:1 Changed 12 years ago by mlipok

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 Changed 12 years ago by anonymous

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 Changed 12 years ago by Mat

  • Resolution set to No Bug
  • Status changed from new to closed

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 Changed 12 years ago by anonymous

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 Changed 12 years ago by Jpm

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

comment:6 Changed 12 years ago by mlipok

daved@...

it works super fast
but you must

Change the operation of various AutoIt functions/parameters.

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

comment:7 Changed 12 years ago by Jpm

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.