Conditional pause with extraction how ?
Forum rules
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
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
-
- Posts: 75
- Joined: Sat Jan 30, 2010 12:43 am
Conditional pause with extraction how ?
Firefox 56 imacros 8.9.7 windows 7
With pure iim macro it's possible create a macro that extract and when extract a particular value set in pause the macro otherwise continue ?
If i made a login and sometimes there is captcha i try to extract box of captcha, when the macro find box of captcha pause the macro, otherwise continue.
Wath type of code i can use to do this ?
Thanks
With pure iim macro it's possible create a macro that extract and when extract a particular value set in pause the macro otherwise continue ?
If i made a login and sometimes there is captcha i try to extract box of captcha, when the macro find box of captcha pause the macro, otherwise continue.
Wath type of code i can use to do this ?
Thanks
Re: Conditional pause with extraction how ?
provoquestosito wrote: ↑Sat Sep 21, 2019 8:50 pmWith pure iim macro it's possible create a macro that extract and when extract a particular value set in pause the macro otherwise continue ?Code: Select all
Firefox 56 imacros 8.9.7 windows 7
If i made a login and sometimes there is captcha i try to extract box of captcha, when the macro find box of captcha pause the macro, otherwise continue.
Wath type of code i can use to do this ?
Thanks
Yep, and fairly easy to implement, and "the" Solution has already been posted several times, if you searched the Forum a bit...

=> Toggle a "YES"/"NO" with 'EVAL()' to use for '!SINGLESTEP', or in your Case for '!EXTRACT_TEST_POPUP' applied to some "fake" extra 'EXTRACT', that will do the Job also...

- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
-
- Posts: 75
- Joined: Sat Jan 30, 2010 12:43 am
Re: Conditional pause with extraction how ?
Hi @chivracq
Thanks for your suggestion i solved with this code
You are the greatest expert of imacros I have ever known, thanks so much you can solve me all the problems of imacros 
Thanks for your suggestion i solved with this code
Code: Select all
TAG POS=1 TYPE=B ATTR=TXT:Are<SP>TEXT-TO-CHECK EXTRACT=TXT
SET !VAR1 EVAL("if (\"{{!EXTRACT}}\" == \"TEXT-TO-CHECK\") {var s = 'https://actions.google.com/sounds/v1/alarms/alarm_clock.ogg';} else {var s = \"\";} s;")
SET !VAR2 EVAL("if (\"{{!EXTRACT}}\" == \"TEXT-TO-CHECK\") {var s = 'YES';} else {var s = \"NO\";} s;")
TAB OPEN
TAB T=2
' Play Sound In New Tab
URL GOTO={{!VAR1}}
TAB T=1
' Pause
SET !SINGLESTEP {{!VAR2}}
SET !SINGLESTEP NO

Re: Conditional pause with extraction how ?
provoquestosito wrote: ↑Sat Sep 21, 2019 10:11 pmHi @chivracq
Thanks for your suggestion i solved with this code
You are the greatest expert of imacros I have ever known, thanks so much you can solve me all the problems of imacrosCode: Select all
TAG POS=1 TYPE=B ATTR=TXT:Are<SP>TEXT-TO-CHECK EXTRACT=TXT SET !VAR1 EVAL("if (\"{{!EXTRACT}}\" == \"TEXT-TO-CHECK\") {var s = 'https://actions.google.com/sounds/v1/alarms/alarm_clock.ogg';} else {var s = \"\";} s;") SET !VAR2 EVAL("if (\"{{!EXTRACT}}\" == \"TEXT-TO-CHECK\") {var s = 'YES';} else {var s = \"NO\";} s;") TAB OPEN TAB T=2 ' Play Sound In New Tab URL GOTO={{!VAR1}} TAB T=1 ' Pause SET !SINGLESTEP {{!VAR2}} SET !SINGLESTEP NO
![]()
Yep, very good, exactly what I meant, and you even combine it with a Conditional Sound... Very neat...

Yeah well, "greatest expert of imacros", ah-ah...!


And, hum, interesting URL for the Sound from 'google.com' instead of playing a Local Sound, that might actually be an interesting Workaround for some other Thread...

- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
-
- Posts: 75
- Joined: Sat Jan 30, 2010 12:43 am
Re: Conditional pause with extraction how ?
@chivracq
Thank you for explaining to me the command '!SINGLESTEP'
I didn't know it is really great to create breaks with the condition, there are always new things to learn.
Thank you for explaining to me the command '!SINGLESTEP'
I didn't know it is really great to create breaks with the condition, there are always new things to learn.
Re: Conditional pause with extraction how ?
provoquestosito wrote: ↑Sun Sep 22, 2019 2:03 pm@chivracq
Thank you for explaining to me the command '!SINGLESTEP'
I didn't know it is really great to create breaks with the condition, there are always new things to learn.
Yeah well, it's not "complicated" to learn "new things"...!

=> Simply check once the 'Command Reference' in the Wiki where all Commands are listed on one same Page, and check the ones you don't know...!

And reading from time to time a few (Pages of) Threads on the Forum is also a great way to see how other Users use iMacros and what can be done with it...

- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
-
- Posts: 75
- Joined: Sat Jan 30, 2010 12:43 am
Re: Conditional pause with extraction how ?
Thanks for the suggestion of the page with the various macros commands I will study it calmly, thank you again
Re: Conditional pause with extraction how ?
provoquestosito wrote: ↑Sun Sep 22, 2019 5:31 pmThanks for the suggestion of the page with the various macros commands I will study it calmly, thank you again
Yep, you're welcome...! It "should" have been your "Bible" for the last 10 years that you've been using iMacros, ah-ah...!

You even have a Link "somewhere" (I can't locate it quickly directly...) where you can download the whole Wiki to "study it calmly" Offline...

=> Exam in 2 weeks...!!

- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
-
- Posts: 75
- Joined: Sat Jan 30, 2010 12:43 am
Re: Conditional pause with extraction how ?
Thanks @chivracq you are Great !