Imacro how to restart or continue the script

Asked

Viewed 1,929 times

5

I have used the immaculate in these sites of bicoins, and it works perfectly the process. however it is not 100%. I need a code to put at the end of the script process that makes it search the word on the site, if you find it start the process again, if not, wait 3600 seconds.

When wrong appears written: "Incorrect captcha entered" that would be by the immaculate:

TAG POS=1 TYPE=P ATTR=ID:free_play_error

And when it hits, "You win"

TAG POS=1 TYPE=DIV ATTR=ID:free_play_result

Follow the end of the script:

TAB CLOSE
TAB T=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:adcopy_response CONTENT={{!EXTRACT}}
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=*
TAG POS=19 TYPE=A ATTR=TXT:×
wait seconds=3600

Basically here it closes the Tab, glue the captcha in the right place and play, but sometimes the captcha comes wrong. Then I would need a function so that he can distinguish whether or not the process worked. If successful, wait for 3600 seconds, if not, start the start script.

1 answer

0

As described on iMacros’s website, it does not allow the use of conditionals, by the way it was developed.

The iMacros language itself is Designed as a descriptive language (similar to HTML) and does not contain conditional statements. iMacros FAQ

The easiest way around this problem is to create a program in another language and call smaller and specific macros for each moment of your application.

Follow the example used by them:

ReturnCode = iim1.iimPlay ("YourMacro1")
 if ReturnCode = 1 then
  'Do something
  MsgBox "OK!"
 else
   'Do something else
   ReturnCode = iim1.iimPlay ("YourMacro2")
 end if 

Some of the languages you can use are: VBS, VB, VBA, VB.NET, Perl, Java, Foxpro, C, C++, C#, ASP, ASP.NET, PHP among others.

When you have the program calling macros and performing the activity correctly, just include a repeat loop like while, FOR and LOOP.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.