IF clause in Imacros Chrome

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
achiles2323
Posts: 4
Joined: Fri Apr 07, 2017 3:07 am

IF clause in Imacros Chrome

Post by achiles2323 » Fri Apr 07, 2017 3:18 am

hi! I am a newbie, just started using iMacros today. I was not sure if this is the right part of the forum to post it , so apologizes if I am spamming it. The code I wanted to write is simple like this;

VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.kl.com
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:checkAvailabilityForm ATTR=ID:saved
TAG POS=1 TYPE=A ATTR=TXT:C<SP>(S)
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:checkAvailabilityForm ATTR=NAME:submit
TAG POS=1 TYPE=IMG ATTR=SRC:https://www.kl.com/Book_It.gif
TAG POS=2 TYPE=INPUT:RADIO FORM=NAME:form1 ATTR=NAME:paymentMethod
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:form1 ATTR=NAME:B1

The problem I have been facing is that Book_It.gif is not there all the time. When it appears, I want the code to click it,
and continue with the rest submitting the payment.

Max

However when it does not find it, it gives an error. I know SET !ERRORIGNORE YES removes the errors but putting it or not is not helping me with what I wanted right now.

I want the code to execute the TAG POS=1 TYPE=IMG ATTR=SRC:https://www.kl.com/Book_It.gif
when it finds the gif and continue.
If it can not find it, I want it to neglect the error and run until the time it finds it.

Any help will be much appreciated. Thank you in advance.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF clause in Imacros Chrome

Post by chivracq » Sat Apr 08, 2017 5:36 am

achiles2323 wrote:hi! I am a newbie, just started using iMacros today. I was not sure if this is the right part of the forum to post it , so apologizes if I am spamming it. The code I wanted to write is simple like this;

Code: Select all

VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.kl.com
TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:checkAvailabilityForm ATTR=ID:saved
TAG POS=1 TYPE=A ATTR=TXT:C<SP>(S)
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:checkAvailabilityForm ATTR=NAME:submit
TAG POS=1 TYPE=IMG ATTR=SRC:https://www.kl.com/Book_It.gif
TAG POS=2 TYPE=INPUT:RADIO FORM=NAME:form1 ATTR=NAME:paymentMethod
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:form1 ATTR=NAME:B1
The problem I have been facing is that Book_It.gif is not there all the time. When it appears, I want the code to click it,
and continue with the rest submitting the payment.

Max

However when it does not find it, it gives an error. I know SET !ERRORIGNORE YES removes the errors but putting it or not is not helping me with what I wanted right now.

I want the code to execute the

Code: Select all

TAG POS=1 TYPE=IMG ATTR=SRC:https://www.kl.com/Book_It.gif
when it finds the gif and continue.
If it can not find it, I want it to neglect the error and run until the time it finds it.

Any help will be much appreciated. Thank you in advance.
Hi "Spammer" and welcome to the Forum but take it easy with the Forum, the 'General' Sub-Forum is the correct one for your Qt, I already had to delete 3 Duplicates in different Sub-Forum...

I deliberately waited for 12h before approving this Thread until you "calmed down" with your "Spam-Rage" ah-ah...!, now consider reading the Forum Rules for Required Info to include in your Posts when you open a Thread (or my Sig => "FCIM") if you want to speed up a bit the "Process" and want some Answers, you've already lost 1 day, and try to use the Forum a bit correctly from now on ("PLEASE HELP ME WITH THIS CODE" is not a correct (= descriptive + SHOUTING IN CAPITALS) Thread Title either)... :roll: :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...
achiles2323
Posts: 4
Joined: Fri Apr 07, 2017 3:07 am

Re: IF clause in Imacros Chrome

Post by achiles2323 » Mon Apr 10, 2017 7:33 pm

Thanks for the feedback, is there anyone who can help me regarding my question?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF clause in Imacros Chrome

Post by chivracq » Mon Apr 10, 2017 9:16 pm

achiles2323 wrote:Thanks for the feedback, is there anyone who can help me regarding my question?
Still willing to help you if you mention your FCI... :idea:
(You missed the part about "FCIM" and "reading the Forum Rules for Required Info" in my previous Reply... :roll: )
=> iMacros for CR v8.4.4, CR54/56...?, OS...?
- (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...
achiles2323
Posts: 4
Joined: Fri Apr 07, 2017 3:07 am

Re: IF clause in Imacros Chrome

Post by achiles2323 » Wed May 10, 2017 1:37 am

I posted my question there already in iMacros for Chrome. You were telling me not to post them there.
I do not know what to include else in this thread.

Obviously, there are not many people helping others here in this forum other than you and your egos are too much to handle.

Thanks.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF clause in Imacros Chrome

Post by chivracq » Wed May 10, 2017 9:43 am

achiles2323 wrote:I posted my question there already in iMacros for Chrome. You were telling me not to post them there.
I do not know what to include else in this thread.

Obviously, there are not many people helping others here in this forum other than you and your egos are too much to handle.

Thanks.
I'm simply asking you to mention 3 Versions about your Configuration, this has nothing to do with "egos", ah-ah...!
When you join a Technical Forum, you read the Forum Rules (in this Case about some Required Info you need to include in your OP about your Config when you open a Thread), and you don't go spamming that Forum by opening 4 Duplicates of your Thread...! :roll:
But if mentioning 3 Versions about your Environment is too complicated for you, then never mind...
And try to follow up on your Thread(s) a bit quicker than 1 month later...
- (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...
achiles2323
Posts: 4
Joined: Fri Apr 07, 2017 3:07 am

Re: IF clause in Imacros Chrome

Post by achiles2323 » Wed May 17, 2017 2:04 am

I am sorry, I misunderstood, then. It is Chrome extension 8.4.4
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF clause in Imacros Chrome

Post by chivracq » Wed May 17, 2017 3:18 am

achiles2323 wrote:I am sorry, I misunderstood, then. It is Chrome extension 8.4.4
Hum, OK, never mind if mentioning 3 Versions is too complicated, but yep "iMacros for CR v8.4.4" was the only Info I already had/knew about your FCI...
I guess you'll be on CR56/57... and I guess OS won't play a role in your case...

Then hum, have a look at the following Thread for Conditional Logic in pure '.iim':
- Workarounds for Conditional Logic in Macro Code
- (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