[bug] javascript "while (true)" breaks "stop" button

Discussions and Tech Support related to the iMacros Firefox Add-on.

Moderators: Marcia, iOpus, Hannes, iOpus, Tech Support, Tom, iOpus

[bug] javascript "while (true)" breaks "stop" button

Postby sourceofinfinity on Sun Mar 29, 2009 12:46 pm

[edit: forgot to put my FF/OS/iMacro info :P]

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
Windows XP, Home Edition
iMacro 6.2.1.4

This causes the stop button to break. The loop will run until you terminate the Firefox process. (Firefox will continue to run in the background if you just hit the close button).
Code: Select all
x = true;
while(x==true){
iimPlay("CODE:WAIT SECONDS=5");
}
sourceofinfinity
 
Posts: 1
Joined: Fri Mar 27, 2009 5:53 am

Re: [bug] javascript "while (true)" breaks "stop" button

Postby kylehase on Mon Jun 01, 2009 1:43 am

It seems the "stop" button only stops the iMacros script that's running inside the Javascript loop. Once the IMacros script stops, Javascript sees that it's done then continues to run it's loop. If you can figure out a way to break the loop I'd be very interested.

I tried to insert UI into the DOM with a button to set x=false but iMacros doesn't understand the document object.
kylehase
 
Posts: 1
Joined: Mon Jun 01, 2009 1:33 am

Re: [bug] javascript "while (true)" breaks "stop" button

Postby leo on Mon Jun 15, 2009 2:08 am

Any idea on how to forcefully stop a Javascript loop without having to kill the FireFox process?
leo
 
Posts: 3
Joined: Mon Jun 15, 2009 12:30 am

Re: [bug] javascript "while (true)" breaks "stop" button

Postby dooferorg on Tue Jun 22, 2010 10:40 am

I would also like to know a workaround to this problem. Any word from the developers on this?

Clicking the stop button while in a macro of 'WAIT SECONDS=xxx' yields a return code of 1, and not -101 as mentioned by the documentation.
dooferorg
 
Posts: 3
Joined: Tue Jun 22, 2010 10:37 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 1 guest