IF String file not found SKIP problem

Discussions and Tech Support specific to the iMacros for Chrome extension.
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
ing32
Posts: 7
Joined: Mon Jul 30, 2018 7:26 am

IF String file not found SKIP problem

Post by ing32 » Mon Jul 30, 2018 7:30 am

Hello! I have a problem with my code

Code: Select all

VERSION BUILD=1002 RECORDER=CR
TAG POS=1 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=2 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=3 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=4 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
REFRESH
WAIT SECONDS=10
I have problems at ATTR=TXT:Like lines, because the site I use sometimes don't reloads all of the buttons I want (long story)


My question is how can I make a code that, when iMacros don't find the string to skip that one? (Line 20, 14, 10 , 4)

I'm new to this kinda of scripting and I have so much to learn, and this will help me out very much. Thanks.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF String file not found SKIP problem

Post by chivracq » Mon Jul 30, 2018 9:28 am

ing32 wrote:Hello! I have a problem with my code

Code: Select all

VERSION BUILD=1002 RECORDER=CR
TAG POS=1 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=2 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=3 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
TAG POS=4 TYPE=BUTTON ATTR=TXT:Like
WAIT SECONDS=5
TAG POS=1 TYPE=YT-FORMATTED-STRING ATTR=ID:text
WAIT SECONDS=10
TAB T=1
WAIT SECONDS=10
REFRESH
WAIT SECONDS=10
I have problems at ATTR=TXT:Like lines, because the site I use sometimes don't reloads all of the buttons I want (long story)

My question is how can I make a code that, when iMacros don't find the string to skip that one? (Line 20, 14, 10 , 4)

I'm new to this kinda of scripting and I have so much to learn, and this will help me out very much. Thanks.
FCIM...! :mrgreen: (Read my Sig...)
=> iMacros for CR v10.0.2, 'PE'/'Free'...?, CR v...?, OS...?

Mention your FCI and try the "long story", that might work better on this (Technical) Forum... :idea:
(And mention as well in which other Browsers you tested that your Thread is "specific" to the 'iMacros for CR' Sub-Forum...)
- (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...
ing32
Posts: 7
Joined: Mon Jul 30, 2018 7:26 am

Re: IF String file not found SKIP problem

Post by ing32 » Mon Jul 30, 2018 11:43 am

The code it's up in the thread

Windows 7
Using chrome
iMacros free
VERSION BUILD=1002 RECORDER=CR
Tested only in chrome

Do you need a photo of my system..?
I just need a script that skips if a string is not found..
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF String file not found SKIP problem

Post by chivracq » Mon Jul 30, 2018 4:01 pm

ing32 wrote:The code it's up in the thread

Code: Select all

Windows 7 
Using chrome
iMacros free
VERSION BUILD=1002 RECORDER=CR
Tested only in chrome

Do you need a photo of my system..?
I just need a script that skips if a string is not found..
=> iMacros for CR v10.0.2 'Free', CR v...?, Win7.
Hum, Browser Version still missing, around CR67 I guess, but OK, never mind, won't play a role...
(And try to select the "correct" Sub-Forum next time you open a Thread..., this one actually belonged to the 'General' one... :wink: )

Yeah well concerning your Qt, simply use '!ERRORIGNORE' I would think..., and you can shorten '!TIMEOUT_STEP' if your 'WAIT' Statements need to be "exact"..., and you can even make those 'WAIT' Statements "Conditional" if your 'text' Element is not found... and you don't want your Script to wait for the "full" hard-coded 'WAIT' Statements... :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...
ing32
Posts: 7
Joined: Mon Jul 30, 2018 7:26 am

Re: IF String file not found SKIP problem

Post by ing32 » Mon Jul 30, 2018 4:34 pm

chivracq wrote:
ing32 wrote:The code it's up in the thread

Code: Select all

Windows 7 
Using chrome
iMacros free
VERSION BUILD=1002 RECORDER=CR
Tested only in chrome

Do you need a photo of my system..?
I just need a script that skips if a string is not found..
=> iMacros for CR v10.0.2 'Free', CR v...?, Win7.
Hum, Browser Version still missing, around CR67 I guess, but OK, never mind, won't play a role...
(And try to select the "correct" Sub-Forum next time you open a Thread..., this one actually belonged to the 'General' one... :wink: )

Yeah well concerning your Qt, simply use '!ERRORIGNORE' I would think..., and you can shorten '!TIMEOUT_STEP' if your 'WAIT' Statements need to be "exact"..., and you can even make those 'WAIT' Statements "Conditional" if your 'text' Element is not found... and you don't want your Script to wait for the "full" hard-coded 'WAIT' Statements... :idea:
THANKS! But I have to put !ERRORIGNORE everywhere or just once?

For example in this code:

Code: Select all

WAIT SECONDS=300
!ERRORIGNORE
REFRESH
WAIT SECONDS=5
!ERRORIGNORE
TAG POS=1 TYPE=BUTTON ATTR=ID:surfButton
!ERRORIGNORE
TAB T=1
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IF String file not found SKIP problem

Post by chivracq » Mon Jul 30, 2018 4:41 pm

ing32 wrote:THANKS! But I have to put !ERRORIGNORE everywhere or just once?

For example in this code:

Code: Select all

WAIT SECONDS=300
!ERRORIGNORE
REFRESH
WAIT SECONDS=5
!ERRORIGNORE
TAG POS=1 TYPE=BUTTON ATTR=ID:surfButton
!ERRORIGNORE
TAB T=1
Only once..., unless/until you want to toggle it 'ON'/'OFF' again... Check the Wiki for the correct Syntax to use... (Just like for any iMacros Commands...! :roll: )

iMacros Commands starting with a "!" are "iMacros Built-in Vars", and always need the 'SET' Command to set/change them... You have the complete List in the Command Ref Guide...
- (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