[Question] Set imacros to pause when ever a error occur

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Chsesus
Posts: 2
Joined: Wed Jun 07, 2017 7:01 am

[Question] Set imacros to pause when ever a error occur

Post by Chsesus » Wed Jun 07, 2017 7:07 am

Hi guys! I was wondering if there is a way to set imacros to pause the when an error occur rather then stop.

like for example, when a link on imacros is not working or some line of it cannot proceed the default behavior is to stop the process. I know that you can force the code to continue with SET !ERRORIGNORE YES but I was wondering if there is a way for it to pause?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Question] Set imacros to pause when ever a error occur

Post by chivracq » Wed Jun 07, 2017 6:31 pm

Chsesus wrote:Hi guys! I was wondering if there is a way to set imacros to pause the when an error occur rather then stop.

like for example, when a link on imacros is not working or some line of it cannot proceed the default behavior is to stop the process. I know that you can force the code to continue with SET !ERRORIGNORE YES but I was wondering if there is a way for it to pause?
(F)CIM...! :mrgreen: (Always mention your FCI when you open a Thread, read my Sig..., many Commands are not implemented for all Browsers/Versions...)

Correct Sub-Forum for your Qt would have been the 'General' one and not the 'iMacros for FF' which is for Threads specific to only FF, if your Script works in other Browsers but fails in FF, or if you use a '.js' Script... (But no need to duplicate...)

For your Qt, you cannot easily fire a "Conditional 'PAUSE'" in pure '.iim'...
1- Either you need to "Conditionally" call some "external" second mini-Macro (to handle the 'PAUSE'), (but that requires a Syntax which doesn't work anymore in v9.0.3 for FF), (this "Solution" is cumbersome, and you need to split your original '.iim' Macro into 2 or more Sub-Macros),
2- or use a '.js' Script and check on the ReturnCode for 'iimPlay()',
3- or in pure '.iim', you could use a Conditional 'PROMPT' instead of the 'PAUSE'. The Result is the same... And that can be done in pure '.iim'..., or in '.js' of course...

I would go for 2- or 3-..., 2- will only work in FF, 3- will work in all Browsers, even if some "Implementations" can use different Syntaxes for different Browsers, ah-ah...!, but there is one that works in all Browsers, I think...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Question] Set imacros to pause when ever a error occur

Post by chivracq » Wed Jun 07, 2017 7:09 pm

Ah-ah...!, you are going to love it, but I just found an easy way to do a Conditional 'PAUSE' (in pure '.iim', I don't do '.js'), ah-ah...!
Hum..., I'm nearly "ashamed" that I never thought of it a lonnnnng time ago already, oops...! :oops:
Ah-hum..., only Drawback is that it will not work on CR, at least until v8.4.4 for CR... Hum..., pity, because it is much easier to implement than the Conditional 'PROMPT'...
Last edited by chivracq on Thu Jun 08, 2017 3:00 am, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Chsesus
Posts: 2
Joined: Wed Jun 07, 2017 7:01 am

Re: [Question] Set imacros to pause when ever a error occur

Post by Chsesus » Wed Jun 07, 2017 10:52 pm

Sorry if I did not provide enough information. I'm using the free firefox plugin.

hivracq, thank you very much for your input! I am not a programmer and i'm rather new to iMacros in general, is there any chance you can... "simplify" your explanation? :D
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Question] Set imacros to pause when ever a error occur

Post by chivracq » Thu Jun 08, 2017 3:14 am

Chsesus wrote:Sorry if I did not provide enough information. I'm using the free firefox plugin.

hivracq, thank you very much for your input! I am not a programmer and i'm rather new to iMacros in general, is there any chance you can... "simplify" your explanation? :D
Yeah, but sorry, "FCIM" again/now for me to follow up, read my Sig... "free firefox plugin" is not enough, mention your 3 Versions for iMacros + Browser + OS... Try using the Forum "a bit correctly" from the beginning, I normally don't even read Qt's if the 3 Versions about your Environment are missing, and certainly don't answer..., or I only make some Exceptions for first time Posters to avoid to let your Thread rot forever, ah-ah... :idea:
=> iMacros for FF v9.0.3...?, FF53...?, OS...?

And it would help and speed up the "Process" if you could post your full Macro, iMacros relies heavily on the HTML Structure of a Page/Site, I will only be able to give you some "generic" Answer otherwise... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Question] Set imacros to pause when ever a error occur

Post by chivracq » Thu Jun 08, 2017 3:18 am

Chsesus wrote:hivracq...
Syntax Error: "hivracq" is not recognized as my Name... Please check your Spelling and try again...! :wink:

Just joking, no big buzz... But you should always pay attention to your Spelling when writing Code, Runtime Engines are usually very-very "stupid", one mini-Typo and you get a Syntax Error and your Code doesn't work, ah-ah...! :idea:
Last edited by chivracq on Thu Jun 08, 2017 1:24 pm, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
amsyed3
Posts: 2
Joined: Thu Jun 08, 2017 10:10 am

Re: [Question] Set imacros to pause when ever a error occur

Post by amsyed3 » Thu Jun 08, 2017 10:22 am

Hey chivracq,
Learned lots of things from you (New member but leaching the forum since 2 years),
There are two types of Conditional PAUSE,
1)'Conditional PROMPT + Conditional Wait (PAUSE in the waiting) {Learned from chivracq}
2)Just got an idead while leaching your Conditional posts

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !EXTRACT_TEST_POPUP NO
URL GOTO=http://forum.imacros.net/
SET !EXTRACT NULL
TAG POS=1 TYPE=A ATTR=TXT:News<SP>and<SP>Announcements EXTRACT=TXT
SET gotIT EVAL("var s='{{!EXTRACT}}'; if(s=='News and Announcements') {var x='YES';} else{var x='NO';} x;")
SET !SINGLESTEP {{gotIT}}
SET !SINGLESTEP NO
'Some Other Code
Thanks chivracq for helping the people!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: [Question] Set imacros to pause when ever a error occur

Post by chivracq » Thu Jun 08, 2017 1:39 pm

amsyed3 wrote:Hey chivracq,
Learned lots of things from you (New member but leaching the forum since 2 years),
There are two types of Conditional PAUSE,
1)'Conditional PROMPT + Conditional Wait (PAUSE in the waiting) {Learned from chivracq}
2)Just got an idead while leaching your Conditional posts

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !EXTRACT_TEST_POPUP NO
URL GOTO=http://forum.imacros.net/
SET !EXTRACT NULL
TAG POS=1 TYPE=A ATTR=TXT:News<SP>and<SP>Announcements EXTRACT=TXT
SET gotIT EVAL("var s='{{!EXTRACT}}'; if(s=='News and Announcements') {var x='YES';} else{var x='NO';} x;")
SET !SINGLESTEP {{gotIT}}
SET !SINGLESTEP NO
'Some Other Code
Thanks chivracq for helping the people!
Yep..., excellent...! Ah-ah...!! (You pinched my Idea, ah-ah...!) :D
And Thanks for your "Appreciation", it's very "rewarding" to hear that you've been following the Forum and learnt from me and to see that you are able to apply my "Principles" to finding a Creative Solution by yourself...! :D

But, yep...!, your Script is exactly the "easy" way Nb_#4 I was mentioning a few Posts above that I was surprised I had never thought of it earlier..., by Conditionally toggling '!SINGLESTEP' to YES/NO using 'EVAL()' and 'EXTRACT' on a Field to check... Very good...!

You are on v8.9.7 for FF (+ FF53 probably), very good, but like I mentioned, this Script/Trick will not work on CR as '!SINGLESTEP' is not supported in iMacros for CR (at least until v8.4.4)...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply