If current URL matches a specific pattern, continue

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
Ciccio90
Posts: 2
Joined: Sat Jan 18, 2020 7:45 am

If current URL matches a specific pattern, continue

Post by Ciccio90 » Mon Feb 10, 2020 6:01 pm

iMacros VERSION BUILD=10021450 freeware
O.S. - WIN 10 x64
Browser - Firefox 72.0.2 (64 bit)


Hello, Sorry for my bad english, but I used a translator.
While playing an existing iMacro script, most of the time I go to an unwanted specific URL on the same window. But, I want iMacros to identify the unwanted URL and put in pause the script.


EXAMPLE:
TAG POS=1 TYPE=BUTTON ATTR=TXT:Start<SP>Browse
WAIT SECONDS=5
Here i want add a code ---> if !URLCURRENT contains google.com, continue the script else PAUSE
TAG POS=1 TYPE=TEXTAREA ATTR=TXT:* EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
Last edited by Ciccio90 on Mon Feb 10, 2020 6:43 pm, edited 1 time in total.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: If current URL matches a specific pattern, continue

Post by chivracq » Mon Feb 10, 2020 6:38 pm

Ciccio90 wrote:
Mon Feb 10, 2020 6:01 pm
iMacros VERSION BUILD=10021450
O.S. - WIN 10 x64
Browser - Firefox 72.0.2 (64 bit)


Hello, Sorry for my bad english, but I used a translator.
While playing an existing iMacro script, most of the time I go to an unwanted specific URL on the same window. But, I want iMacros to identify the unwanted URL and put in pause the script.

EXAMPLE:

Code: Select all

TAG POS=1 TYPE=BUTTON ATTR=TXT:Start<SP>Browse
WAIT SECONDS=5
[u]Here i want add a code ---> if !URLCURRENT contains google.com, continue the script else PAUSE[/u]
TAG POS=1 TYPE=TEXTAREA ATTR=TXT:* EXTRACT=TXT 
SET !CLIPBOARD {{!EXTRACT}}

Hum..., luckily for you, I cannot disapprove this new Thread of yours anymore, but try to select the "correct" Sub-Forum when you open a new Thread, this one has nothing specific to the 'iMacros for FF' Sub-Forum... :roll:
=> Thread will "eventually" get moved to the 'General' Sub-Forum where it belongs by the Forum Admin, (I cannot do it myself)... (But no need to duplicate now...)

Nice to see that you've "finally" read the Forum Rules and that you now mention your FCI in this Thread... ('Free'/'PE' is still missing though, about your iMacros Version...)
I think I'll pass on this one as you never mentioned your FCI in your previous Thread like I had asked you... OK, fair enough... :|
Some other Advanced User tried to help you also in that Thread, but you never followed up... :shock: , which is also a "Show-killer" for me to help Users... :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...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: If current URL matches a specific pattern, continue

Post by chivracq » Tue Feb 11, 2020 12:40 pm

Oh, good...!, I see you've added "Freeware" to your FCI... :D
- (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...
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

Re: If current URL matches a specific pattern, continue

Post by techimac » Wed Feb 19, 2020 11:52 pm

Ciccio90 wrote:
Mon Feb 10, 2020 6:01 pm
iMacros VERSION BUILD=10021450 freeware
O.S. - WIN 10 x64
Browser - Firefox 72.0.2 (64 bit)


Hello, Sorry for my bad english, but I used a translator.
While playing an existing iMacro script, most of the time I go to an unwanted specific URL on the same window. But, I want iMacros to identify the unwanted URL and put in pause the script.


EXAMPLE:
TAG POS=1 TYPE=BUTTON ATTR=TXT:Start<SP>Browse
WAIT SECONDS=5
Here i want add a code ---> if !URLCURRENT contains google.com, continue the script else PAUSE
TAG POS=1 TYPE=TEXTAREA ATTR=TXT:* EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
javascript code but won't run in your setup
can run in iMacros 8.9.7
Error ignore is NO so it has to be changed to include that

Code: Select all

iimPlayCode("TAG POS=1 TYPE=BUTTON ATTR=TXT:Start<SP>Browse\n WAIT SECONDS=5\n SET !EXTRACT {{!URLCURRENT}}")

if (iimGetLastExtract().indexOf("google.com")> -1)
{
iimPlayCode("TAG POS=1 TYPE=TEXTAREA ATTR=TXT:* EXTRACT=TXT\n SET !CLIPBOARD {{!EXTRACT}}")
}
else
{
iimPlayCode("PAUSE")
}
Available for custom iim, javascript iMacros scripts
Post Reply