Stop if value exists - Continue if value doesn't (HELP!!!)

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

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.

Stop if value exists - Continue if value doesn't (HELP!!!)

by Capyn on Tue May 16, 2017 7:53 am

Hi there,

I'm trying to make my script stop if value exists - BUT continue if value doesn't exist...

Here is my code:

SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND

So far it stops if value is present (obviously). BUT when the value isn't present it stops regardless (does not loop) because there is no value... "Value could not be found".

Would you know how to make it continue if value doesn't exist, BUT stop if value exists?

FYI I have tried the following with no luck either:

SET !ERRORIGNORE YES
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE NO
SET !TIMEOUT_STEP 90

SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 90

Thanks in advance!
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Tue May 16, 2017 9:45 am

FYI - This is the error I get:

Element FONT specified by TXT:1<SP>NEW was not found, line: 2 (Error code: -921)
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by chivracq on Tue May 16, 2017 10:44 am

Capyn wrote:Hi there,

I'm trying to make my script stop if value exists - BUT continue if value doesn't exist...

Here is my code:

Code: Select all
SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND


So far it stops if value is present (obviously). BUT when the value isn't present it stops regardless (does not loop) because there is no value... "Value could not be found".

Would you know how to make it continue if value doesn't exist, BUT stop if value exists?

FYI I have tried the following with no luck either:

Code: Select all
SET !ERRORIGNORE YES
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE NO
SET !TIMEOUT_STEP 90


Code: Select all
SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 90


Thanks in advance!

Capyn wrote:FYI - This is the error I get:

Element FONT specified by TXT:1<SP>NEW was not found, line: 2 (Error code: -921)

Good, correct Sub-Forum but sorry, you missed the CIM/FCIM part in your previous Thread... :roll:
I don't read/answer Threads when FCI is missing, or only sometimes for your first Thread...
- (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: 6472
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Tue May 16, 2017 12:42 pm

chivracq wrote:
Capyn wrote:Hi there,

I'm trying to make my script stop if value exists - BUT continue if value doesn't exist...

Here is my code:

Code: Select all
SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND


So far it stops if value is present (obviously). BUT when the value isn't present it stops regardless (does not loop) because there is no value... "Value could not be found".

Would you know how to make it continue if value doesn't exist, BUT stop if value exists?

FYI I have tried the following with no luck either:

Code: Select all
SET !ERRORIGNORE YES
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE NO
SET !TIMEOUT_STEP 90


Code: Select all
SET !ERRORIGNORE NO
URL GOTO= (some random website)
TAG POS=1 TYPE=FONT ATTR=TXT:*1<SP>NEW* CONTENT=EVENT:FAIL_IF_FOUND
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 90


Thanks in advance!

Capyn wrote:FYI - This is the error I get:

Element FONT specified by TXT:1<SP>NEW was not found, line: 2 (Error code: -921)

Good, correct Sub-Forum but sorry, you missed the CIM/FCIM part in your previous Thread... :roll:
I don't read/answer Threads when FCI is missing, or only sometimes for your first Thread...



Apologies :)

I am using the latest iMacro (.iim) on the latest firefox - My operating system is Apple Mac Book Pro.

Thanks in advance!
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by chivracq on Tue May 16, 2017 7:58 pm

Capyn wrote:Apologies :)

I am using the latest iMacro (.iim) on the latest firefox - My operating system is Apple Mac Book Pro.

Thanks in advance!

Hum..., yeah but read my Reply in your previous Thread about FCI..., "latest"/"latest" is still completely vague on a Tech Forum, it still leaves a Matrix of 4x4=16 possible Configurations here between FF and iMacros for FF...!, even if maybe only 4 or 6 are more "Common", find the 'Help'/'About' to find your exact Version of any Software you are using... :roll:
- (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: 6472
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Tue May 16, 2017 9:22 pm

chivracq wrote:
Capyn wrote:Apologies :)

I am using the latest iMacro (.iim) on the latest firefox - My operating system is Apple Mac Book Pro.

Thanks in advance!

Hum..., yeah but read my Reply in your previous Thread about FCI..., "latest"/"latest" is still completely vague on a Tech Forum, it still leaves a Matrix of 4x4=16 possible Configurations here between FF and iMacros for FF...!, even if maybe only 4 or 6 are more "Common", find the 'Help'/'About' to find your exact Version of any Software you are using... :roll:



sure! :)

FF v9.0.3, FF53, MacOS X_10_10.1
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by chivracq on Wed May 17, 2017 11:31 am

Capyn wrote:
chivracq wrote:
Capyn wrote:Apologies :)

I am using the latest iMacro (.iim) on the latest firefox - My operating system is Apple Mac Book Pro.

Thanks in advance!

Hum..., yeah but read my Reply in your previous Thread about FCI..., "latest"/"latest" is still completely vague on a Tech Forum, it still leaves a Matrix of 4x4=16 possible Configurations here between FF and iMacros for FF...!, even if maybe only 4 or 6 are more "Common", find the 'Help'/'About' to find your exact Version of any Software you are using... :roll:



sure! :)

Code: Select all
FF v9.0.3, FF53, MacOS X_10_10.1

Okaaaay...!, we finally have your FCI...!, now I can start reading from the beginning...
This Info belongs to the top of your Opening Post when you start a Thread, I won't be asking next time... :idea:

So, OK, you are using the 'CONTENT=EVENT:FAIL_IF_FOUND' Syntax, I would expect indeed the same Behaviour like you expect if the Value/Field is not found..., but I "suspect" the 'FAIL_IF_FOUND' Command is using the 'EXTRACT' Mechanism first to try to locate your Element, and there seems to be some Bug (or at least a "Change in Behaviour") in v9.0.3 for FF, like you can see in the following Thread:
- Issue Extract with firefox plugin
=> The (easiest) Solution would be to revert to v8.9.7 for FF which works on FF53 and is anyway much more reliable and stable than v9.0.3.

I could think of a Workaround of the same kind like the one I mentioned a bit in the Thread I refer to + using 'MacroError()' instead of 'FAIL_IF_FOUND' in your Case, but..., pfff..., it would be cumbersome as well... Using v8.9.7 is your best Solution...!
- (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: 6472
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Wed May 17, 2017 2:17 pm

Code: Select all
FF v9.0.3, FF53, MacOS X_10_10.1
[/quote]
Okaaaay...!, we finally have your FCI...!, now I can start reading from the beginning...
This Info belongs to the top of your Opening Post when you start a Thread, I won't be asking next time... :idea:

So, OK, you are using the 'CONTENT=EVENT:FAIL_IF_FOUND' Syntax, I would expect indeed the same Behaviour like you expect if the Value/Field is not found..., but I "suspect" the 'FAIL_IF_FOUND' Command is using the 'EXTRACT' Mechanism first to try to locate your Element, and there seems to be some Bug (or at least a "Change in Behaviour") in v9.0.3 for FF, like you can see in the following Thread:
- Issue Extract with firefox plugin
=> The (easiest) Solution would be to revert to v8.9.7 for FF which works on FF53 and is anyway much more reliable and stable than v9.0.3.

I could think of a Workaround of the same kind like the one I mentioned a bit in the Thread I refer to + using 'MacroError()' instead of 'FAIL_IF_FOUND' in your Case, but..., pfff..., it would be cumbersome as well... Using v8.9.7 is your best Solution...![/quote]

Thank you so much for your quick reply and solution chivracq, really helpful! :)

I will get onto this as soon as possible and report back.
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Wed May 17, 2017 3:24 pm

Code: Select all
FF v9.0.3, FF53, MacOS X_10_10.1
[/quote]
Okaaaay...!, we finally have your FCI...!, now I can start reading from the beginning...
This Info belongs to the top of your Opening Post when you start a Thread, I won't be asking next time... :idea:

So, OK, you are using the 'CONTENT=EVENT:FAIL_IF_FOUND' Syntax, I would expect indeed the same Behaviour like you expect if the Value/Field is not found..., but I "suspect" the 'FAIL_IF_FOUND' Command is using the 'EXTRACT' Mechanism first to try to locate your Element, and there seems to be some Bug (or at least a "Change in Behaviour") in v9.0.3 for FF, like you can see in the following Thread:
- Issue Extract with firefox plugin
=> The (easiest) Solution would be to revert to v8.9.7 for FF which works on FF53 and is anyway much more reliable and stable than v9.0.3.

I could think of a Workaround of the same kind like the one I mentioned a bit in the Thread I refer to + using 'MacroError()' instead of 'FAIL_IF_FOUND' in your Case, but..., pfff..., it would be cumbersome as well... Using v8.9.7 is your best Solution...![/quote]

I appreciate your help chivracq!!!! It worked - I downgraded as suggested and TADAAAAAA!!! thank you so much! This has been solved! :D :D :D
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm

Re: Stop if value exists - Continue if value doesn't (HELP!!

by chivracq on Wed May 17, 2017 5:23 pm

Capyn wrote:Thank you so much for your quick reply and solution chivracq, really helpful! :)

I will get onto this as soon as possible and report back.

Capyn wrote:I appreciate your help chivracq!!!! It worked - I downgraded as suggested and TADAAAAAA!!! thank you so much! This has been solved! :D :D :D

OK, good to hear...! :D

Oh...!, that means that we have another Bug for v9.0.3 for 'FAIL_IF_FOUND', which means that the "Change in Behaviour" for 'EXTRACT' is actually a Bug as well... :roll:

Your last 2 Posts are a bit "messy" with the 'Quote' Part for both, not easy to read...

But remember my CIM/FCIM/FCI "Rant" for next time you open a Thread, I won't ask anymore and won't react otherwise, you would have gotten your Solution within 1 hour from opening your Thread if you had handled that part correctly, ah-ah...! :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: 6472
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Stop if value exists - Continue if value doesn't (HELP!!

by Capyn on Thu May 18, 2017 7:22 am

chivracq wrote:
Capyn wrote:Thank you so much for your quick reply and solution chivracq, really helpful! :)

I will get onto this as soon as possible and report back.

Capyn wrote:I appreciate your help chivracq!!!! It worked - I downgraded as suggested and TADAAAAAA!!! thank you so much! This has been solved! :D :D :D

OK, good to hear...! :D

Oh...!, that means that we have another Bug for v9.0.3 for 'FAIL_IF_FOUND', which means that the "Change in Behaviour" for 'EXTRACT' is actually a Bug as well... :roll:

Your last 2 Posts are a bit "messy" with the 'Quote' Part for both, not easy to read...

But remember my CIM/FCIM/FCI "Rant" for next time you open a Thread, I won't ask anymore and won't react otherwise, you would have gotten your Solution within 1 hour from opening your Thread if you had handled that part correctly, ah-ah...! :idea:



Oops sorry! Definitely, I can see now why it's crucial - I wish I got it right the first time!! :)
Capyn
 
Posts: 22
Joined: Sun May 14, 2017 4:47 pm


Return to General Support & Discussions

Who is online

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

-->