cjseriy wrote:Thank you very much for the direction towards Conditional Refresh. I was able to find your code from one of a threads.
I modified it a bit. Here it is:
Code: Select all
SET URL_Site1 http://www.site.com
URL GOTO={{URL_Site1}}
WAIT SECONDS=5
SET !TIMEOUT_STEP 0
TAG POS=1 TYPE=A ATTR=TXT:*Terms<SP>of<SP>Service* EXTRACT=TXT
'popup window will appear if page doesnt load and then it will be refreshed
SET !VAR1 EVAL("var text=\"{{!EXTRACT}}\"; if(text==\"#EANF#\") text = \"YES\";else text = \"NO\";text;")
SET !EXTRACT_TEST_POPUP {{!VAR1}}
TAG POS=1 TYPE=A ATTR=TXT:*Terms<SP>of<SP>Service* EXTRACT=TXT
SET URL_Refresh EVAL("var s='{{!EXTRACT}}'; var u='{{URL_Site1}}'; var x; if(s=='#EANF#'){x=u;} else {x='';}; x;")
SET EXTRACT NULL
WAIT SECONDS=2
URL GOTO={{URL_Refresh}}
Yep, very good...!
Creative Solution with the Conditional '!EXTRACT_TEST_POPUP', ah-ah...!
There are other Solutions for a 'Conditional 'PROMPT'' or a 'Conditional 'PAUSE'', but this one is as good, I would think..., can be seen as a "Shortcut" if you actually want to display the 'EXTRACT' in the 'PROMPT'...
And it might actually come in handy with v10.0.2 for FF, the 'PROMPT' Command/Functionality is a bit Buggy in that Version, maybe the '!EXTRACT_TEST_POPUP' could be some interesting Workaround in some cases, ah-ah...!
Oh-oh...!, but watch out that the 'TEST_POPUP' won't appear if you loop your Script, ah-ah...!
(The Reload will still take place if needed, but you won't be notified by the Popup...)
- (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...