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

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

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

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

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

by chivracq on Wed Jun 07, 2017 11:31 am

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by chivracq on Wed Jun 07, 2017 12: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 Wed Jun 07, 2017 8:00 pm, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

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

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

by chivracq on Wed Jun 07, 2017 8:14 pm

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by chivracq on Wed Jun 07, 2017 8:18 pm

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 6:24 am, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by amsyed3 on Thu Jun 08, 2017 3: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!
amsyed3
 
Posts: 1
Joined: Thu Jun 08, 2017 3:10 am

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

by chivracq on Thu Jun 08, 2017 6:39 am

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 5988
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 8 guests

-->