if you find this word then press this button IMACROS CODE?

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
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
dicekid
Posts: 2
Joined: Mon Jul 16, 2018 11:33 pm

if you find this word then press this button IMACROS CODE?

Post by dicekid » Tue Jul 17, 2018 10:48 am

hey, first sorry if this is the wrong section

i need a code that will look for the word "match" in a webpage, and if there is any then initiate this line

TAG POS=1 TYPE=BUTTON ATTR=TXT:Bet

can anyone make me this code

thanks in advance
access2vivek
Posts: 36
Joined: Wed Dec 20, 2017 10:00 am

Re: if you find this word then press this button IMACROS COD

Post by access2vivek » Thu Nov 08, 2018 2:08 pm

dicekid wrote: i need a code that will look for the word "match" in a webpage, and if there is any then initiate this line
TAG POS=1 TYPE=BUTTON ATTR=TXT:Bet
I am assuming that the word "match" is in a span. You can change it to DIV or whatever element the text appears in. Here is the code in JavaScript.

Code: Select all

var code="CODE:";
code+="SET !TIMEOUT_STEP 1\n";
code+="SET !ERRORIGNORE YES\n";
code+="TAG POS=1 TYPE=SPAN ATTR=TXT:*match* EXTRACT=TXT\n";
iimPlay(code);

if(iimGetLastExtract()!="#EANF#")
   iimPlayCode("TAG POS=1 TYPE=BUTTON ATTR=TXT:Bet");
Post Reply