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 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
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