Javascript iMacros Script Absolutley Will Not Stop

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Thu Jul 01, 2010 1:27 pm

Hi, I have version 6.7.0.1, with firefox ver 3.6.6. I have written several scripts but I can't understand why this one will not stop when you press stop.

When using a javascript for loop it normally stops when you hit stop, a while back it was real bad about not stopping but I think you guys fixed that. Now I have dozens of scripts that I have wrote, and I use the same fundamental techniques in all of them, but this example of code absolutely will not stop until it does all 10 cycles, while most of loops of the same nature work just fine.

So, what is it about this script thats different, perhaps I have been looking at code to long and don't see they typo.

Code: Select all

//imacros-js:showsteps no

BATTLE = prompt("ENTER BATTLE TITLE","Best Looking"); 
BATTLE = BATTLE.replace(/ /g,"<SP>"); 
CAPTION = prompt("ENTER CAPTION FOR THE PICTURE (YOUR DEFAULT PICTURE WILL BE USED ON ALL BATTLES)",":-]"); 
CAPTION = CAPTION.replace(/ /g,"<SP>"); 

for (MAIN_LOOP = 1; MAIN_LOOP < 10; MAIN_LOOP++)
{
iimPlay("CODE:TAG POS=1 TYPE=A ATTR=TXT:Battles\nWAIT SECONDS=1\n"); 
iimPlay("CODE:TAG POS=1 TYPE=A ATTR=TXT:Challenge<SP>* EXTRACT=HREF\n"); URL = iimGetLastExtract(1); 

iimPlay("CODE:URL GOTO=" + URL + "\nWAIT SECONDS=1\n"); 
iimPlay("CODE:TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:battle_caption CONTENT=" + CAPTION + "\nWAIT SECONDS=1\n"); 
iimPlay("CODE:TAG POS=1 TYPE=SELECT FORM=NAME:frmbattle ATTR=ID:battle_category CONTENT=%999\nWAIT SECONDS=1\n"); 
iimPlay("CODE:TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:frmbattle ATTR=ID:custom_category CONTENT=" + BATTLE + "\nWAIT SECONDS=1\n"); 
iimPlay("CODE:TAG POS=1 TYPE=SELECT FORM=NAME:frmbattle ATTR=ID:battle_length CONTENT=%3\nWAIT SECONDS=1\n");

iimPlay("CODE:TAG POS=1 TYPE=IMG ATTR=ID:recaptcha_reload EXTRACT=ALT\n"); CAPTCHA = iimGetLastExtract(1);
if (CAPTCHA == "Get a new challenge"){
alert("CAPTCHA Needs filled out, Script will Pause, Hit OK and Enter Captcha, then HIT SUBMIT\nThen in your IMacros Side Bar, PLEASE HIT CONTINUE TO RESUME");
iimPlay("CODE:PAUSE");}

iimPlay("CODE:TAG POS=1 TYPE=IMG ATTR=SRC:http://assets.mybcdna.com//battles_btn_chall_now.gif\nWAIT SECONDS=1\n"); 
}
Any Ideas to throw around ??
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Thu Jul 01, 2010 3:43 pm

I have actually noticed more scripts doing this, scripts that havent been changed and didnt do it before.
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Thu Jul 01, 2010 3:49 pm

Yeah definitely something going on, it is even doing it on the most basic of loops, you can run this on any page and see for yourself.

Code: Select all

//imacros-js:showsteps no

POS = 1;
for (LOOP = 1; LOOP <= 25; LOOP++ )
{
TEST = "CODE: ";
TEST += "TAG POS=" + POS + " TYPE=A ATTR=href:* EXTRACT=TXT\n";
TEST += "WAIT SECONDS=1\n";
iimPlay(TEST);
DATA = iimGetLastExtract(1);
POS = POS + 1;
}
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Fri Jul 02, 2010 4:55 pm

BUMP
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Tom, Tech Support » Sun Jul 11, 2010 10:39 am

Hello Trucifix,

Sorry for the delayed response. Would you say you've noticed this more since upgrading Firefox and/or iMacros?

(btw, nice avatar!)
Regards,

Tom, iMacros Support
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Tue Jul 13, 2010 5:11 am

I cant be sure when it started, I write the scripts, I really don't use them that much. I noticed this when writing one, thought I had did something wrong, but as you can see, it does it on even the simplest of JavaScript Imacros. I don't keep many addon's on firefox, and to be honest, I remember Firefox updating more lately than Imacros (Not trying to say anything negative :) ) So I would be willing to bet it started after a firefox update.

Im just kind of dealing with it now as Im pretty sure you guys will figure it out because it used to do this a while back, but it was fixed with an imacros update.

If you need any info from me, I will be happy to give it :)
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Tom, Tech Support » Thu Jul 15, 2010 10:25 am

Hmmm... I did run the little test macro you last posted and I was able to stop its execution by pressing the Stop button with no problem each time. I am also runnning Firefox 3.6.6 with iMacros 6.7.0.1. Have you considered explicitly checking the return value of iimPlay for -102 (User pressed Stop button) and handling this?
Regards,

Tom, iMacros Support
Trucifix
Posts: 39
Joined: Thu Mar 05, 2009 10:44 am
Location: Columbus, OH
Contact:

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Trucifix » Thu Jul 15, 2010 2:12 pm

Tom I swear I'm not crazy, but its like this, all these scripts I write did this for several days, pressing stop did nothing as the script would run for the full loop until stopped.

BUT, I haven't reinstalled anything, and there has been no updates of any kind, and yet it works perfectly fine now.

I assure you it did do it despite the evidence, and since I haven't changed anything, I have no clue what the common denominator is. But it works now, so that's all that matters.
Interested in selling your professional iMacro Scripts ?
Image
http://www.getimacroscripts.com
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Tom, Tech Support » Thu Jul 15, 2010 2:30 pm

I'll just blame it on gremlins.
Regards,

Tom, iMacros Support
Snayler
Posts: 12
Joined: Wed Mar 26, 2014 2:12 pm

Re: Javascript iMacros Script Absolutley Will Not Stop

Post by Snayler » Wed Mar 26, 2014 2:20 pm

Sorry for digging up this thread, just wanted to blame the Javascript settings on this one. Setting iMacros not to show javascript steps will cause this problem. Leaving the default option (show javascript steps) will make the stop button work as expected.
Post Reply