IF String file not found SKIP problem

Discussions and Tech Support related to the iMacros Google Chrome extension.
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.
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: 8052
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)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...
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: 8052
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)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...
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: 8052
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)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...
Post Reply