IMacros: SyntaxError: missing ; before statement (Error code: 991) - imacros

I am trying to edit my javascript code to make it function properly.
I keep getting this syntax error though:
SyntaxError: missing ; before statement (Error code: 991)
Here is my script:
VERSION BUILD=7601105 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
URL GOTO=http://addmefast.com/free_points/twitter.html
URL GOTO=addmefast.com/free_points/twitter.html
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
TAG POS=1 TYPE=A ATTR=TXT:Follow
WAIT SECONDS=30
URL GOTO=http://addmefast.com/free_points/twitter_tweets.html
URL GOTO=addmefast.com/free_points/twitter_tweets.html
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
TAG POS=1 TYPE=A ATTR=TXT:Tweet
WAIT SECONDS=30
URL GOTO=http://addmefast.com/free_points/twitter_retweets.html
URL GOTO=addmefast.com/free_points/twitter_retweets.html
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
TAG POS=1 TYPE=A ATTR=TXT:Retweet
WAIT SECONDS=30

This is real javascript imacros code:
var macro;
macro = "CODE:";
macro += "VERSION BUILD=7601105 RECORDER=FX" + "\n";
macro += "TAB T=1" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
macro += "URL GOTO=http://addmefast.com/free_points/twitter.html" + "\n";
macro += "URL GOTO=addmefast.com/free_points/twitter.html" + "\n";
macro += "WAIT SECONDS=5" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Follow" + "\n";
macro += "WAIT SECONDS=30" + "\n";
macro += "URL GOTO=http://addmefast.com/free_points/twitter_tweets.html" + "\n";
macro += "URL GOTO=addmefast.com/free_points/twitter_tweets.html" + "\n";
macro += "WAIT SECONDS=5" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Tweet" + "\n";
macro += "WAIT SECONDS=30" + "\n";
macro += "URL GOTO=http://addmefast.com/free_points/twitter_retweets.html" + "\n";
macro += "URL GOTO=addmefast.com/free_points/twitter_retweets.html" + "\n";
macro += "WAIT SECONDS=5" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Retweet" + "\n";
macro += "WAIT SECONDS=30" + "\n";
iimPlay(macro);

Related

IF and ELSE - IMACROS

TAG POS=1 TYPE=A ATTR=TXT:next
FRAME F=1
WAIT SECONDS=3
TAG POS=1 TYPE=A ATTR=TXT:Contact
FRAME F=0
WAIT SECONDS=7
How do I insert a condition in ATTR: Contact?
I would check if the open page has Contact link, Contact us link , Help link, etc.
If the page does not have any of the links go to the end
As a workaround you may try the !ERRORIGNORE variable. Something like this:
TAG POS=1 TYPE=A ATTR=TXT:next
FRAME F=1
WAIT SECONDS=3
SET !ERRORIGNORE YES
TAG POS=1 TYPE=A ATTR=TXT:Contact
SET !ERRORIGNORE NO
FRAME F=0
WAIT SECONDS=7

IMACROS - Infinit Loop

How do I get an infinite loop with this part of the code
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5
the complete code:
VERSION BUILD=844 RECORDER=CR
URL GOTO=http://localhost/site/
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5
Just play the following macro in loop mode:
SET myUrl http://localhost/site/
SET curUrl EVAL("({{!LOOP}} == 1) ? '{{myUrl}}' : 'javascript: undefined';")
URL GOTO={{curUrl}}
TAG POS=1 TYPE=A ATTR=TXT:next
WAIT SECONDS=5
If you want the loop to be "infinite" set the 'Max:' value to a very big number (e.g. 99999999999).

Having trouble getting text input working on imacro

I'm trying to record a macro with text input, but whenever it gets up to entering the text, I get the following error:
RuntimeError: element INPUT specified by ID:ctrl699077237575BF0A8F14562A1C861DE76E16F42BA592707587115627BCDE1D8831F90660D4D3C18832F46AF95CFDBC99 was not found, line 6 (Error code: -921)
Here is the macro I am trying to get working. Please share your thoughts.
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=https://www.simplyenergy.com.au/pay-my-bill/
TAG POS=1 TYPE=SPAN ATTR=TXT:Credit<SP>Card
FRAME F=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl699077237575BF0A8F14562A1C861DE76E16F42BA592707587115627BCDE1D8831F90660D4D3C18832F46AF95CFDBC99 CONTENT=Test<SP>123
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl40430E5B2B6C22C79DAAC192280DCD94AB9086F07518E7F9EB6990B64A77B57EFAA5B281D3E99CBE0BA543CC8AD9C10A CONTENT=Test<SP>123
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl699077237575BF0A8F14562A1C861DE792B18ADFEC66456C7F128AB6AA513AE0C6B291CFA6EE3A4378214EA839681B77 CONTENT=Test<SP>123
Try in the following way:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=https://www.simplyenergy.com.au/pay-my-bill/
TAG POS=1 TYPE=SPAN ATTR=TXT:Credit<SP>Card
FRAME F=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl* CONTENT=Test<SP>123
TAG POS=2 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl* CONTENT=Test<SP>123
TAG POS=3 TYPE=INPUT:TEXT FORM=ID:frmMain ATTR=ID:ctrl* CONTENT=Test<SP>123

IF statement for iMacros Frame knowing the range

I'm doing a macro but Frame number change, I know that this topic already exist but, I know the range of the frame, 5,6,7,8.
I want to make an IF else else else.
This is all my macros code, with FRAME F=5.
VERSION BUILD=8810214 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
TAG POS=1 TYPE=A ATTR=TXT:Entra<SP>y<SP>juega
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:nueva
TAG POS=1 TYPE=LABEL FORM=ID:new_user ATTR=TXT:*<SP>Nombre<SP>de<SP>usuario
SET !VAR1 EVAL("var letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','x','y','z']; var string = ''; for(var i = 0; i < 10; i++){string += letters[parseInt(Math.random() * 25)]}; string")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:new_user ATTR=ID:user_username CONTENT={{!var1}}
TAB T=2
TAG POS=1 TYPE=DIV ATTR=ID:pubinboxfield
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:inboxfield CONTENT={{!var1}}
TAG POS=1 TYPE=BTN ATTR=TXT:Go!
TAB T=1
TAG POS=1 TYPE=LABEL FORM=ID:new_user ATTR=TXT:*<SP>Email
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:new_user ATTR=ID:user_email CONTENT={{!var1}}#
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:new_user ATTR=ID:user_password CONTENT=BANrCXf2bkM4uvxeSORkLxUpmItcz9Lusq6IaZQ3mL3yozehFkMJnfz3msgD+NnA7mBkCwAvPI+90ieW3VOGzg==
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:new_user ATTR=ID:user_password_confirmation CONTENT=K1rNDyUqpAtDiYrdjh+43msyM72lnYWGL3rdB2lQecy+4UBQQ1F51qOPP9xFRv6/3y78xQyWtkd+4qa3II5wNg==
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:new_user ATTR=ID:terms_and_conditions CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:new_user ATTR=NAME:commit
TAB T=2
WAIT SECONDS=60
TAG POS=1 TYPE=DIV ATTR=TXT:Bienvenido<SP>Confirma<SP>tu<SP>cuenta
FRAME F=5
TAG POS=1 TYPE=A ATTR=TXT:Empieza<SP>a<SP>jugar*
TAG POS=1 TYPE=DIV ATTR=TXT:Fútbol
WAIT SECONDS=10
TAG POS=1 TYPE=A ATTR=TXT:Liga
WAIT SECONDS=10
TAG POS=1 TYPE=A ATTR=TXT:Juega
WAIT SECONDS=10
TAG POS=1 TYPE=LABEL FORM=ID:bet_form_71595 ATTR=ID:label_option_id_479188
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:bet_form_71595 ATTR=ID:option_id_479188
TAG POS=1 TYPE=INPUT:NUMBER FORM=ID:bet_form_71595 ATTR=ID:points CONTENT=500
TAG POS=1 TYPE=BUTTON FORM=ID:bet_form_71595 ATTR=ID:play-action
WAIT SECONDS=20
TAG POS=1 TYPE=A ATTR=TXT:×
WAIT SECONDS=3
TAG POS=1 TYPE=A ATTR=TXT:Liga
WAIT SECONDS=10
TAG POS=1 TYPE=A ATTR=TXT:Juega
WAIT SECONDS=10
TAG POS=1 TYPE=LABEL FORM=ID:bet_form_71601 ATTR=ID:label_option_id_479262
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:bet_form_71601 ATTR=ID:option_id_479262
TAG POS=1 TYPE=INPUT:NUMBER FORM=ID:bet_form_71601 ATTR=ID:points CONTENT=500
TAG POS=1 TYPE=BUTTON FORM=ID:bet_form_71601 ATTR=ID:play-action
WAIT SECONDS=20
TAG POS=1 TYPE=A ATTR=TXT:Liga
WAIT SECONDS=10
TAG POS=1 TYPE=A ATTR=TXT:Juega
WAIT SECONDS=10
TAG POS=1 TYPE=LABEL FORM=ID:bet_form_71490 ATTR=ID:label_option_id_478013
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:bet_form_71490 ATTR=ID:option_id_478013
TAG POS=1 TYPE=INPUT:NUMBER FORM=ID:bet_form_71490 ATTR=ID:points CONTENT=3000
TAG POS=1 TYPE=BUTTON FORM=ID:bet_form_71490 ATTR=ID:play-action
WAIT SECONDS=20
TAG POS=1 TYPE=I ATTR=CLASS:fa<SP>fa-sign-out&&TXT:
TAB CLOSEALLOTHERS
URL GOTO=http://www.exampleweb1.com/
TAB OPEN
TAB T=2
URL GOTO=https://www.exampleweb2.com/
Thanks for all, regards.
var macro;
macro = "CODE:" + "\n";
macro += "SET !TIMEOUT_STEP 0" + "\n";
macro += "FRAME F={{frame}}" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Juega* CONTENT=EVENT:MOUSEOVER" + "\n";
var macro1;
macro1 = "CODE:" + "\n";
macro1 += "FRAME F={{frame}}" + "\n";
macro1 += "TAG POS=1 TYPE=A ATTR=TXT:Juega* " + "\n";
macro1 += "TAB T=2" + "\n";
//declare frame
var frame = 1;
//loop until script finds matching frame
while (true) {
iimSet("frame", frame)
ret = iimPlay(macro)
//if macro returns true then frame has been found. break and play macro1
if (ret > 0) {
break;
}
frame++;
}
//set the frame and play macro
iimSet("frame", frame)
iimPlay(macro1)
This should be the code you are looking for. Test it and see if it works.

Imacros script stopped working all of a sudden

I have written this code earlier. Previously it was working fine. But suddenly one day iMacros stopped working without I changed anything....
it stops at line 19
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://api.deathbycaptcha.com/decaptcher ATTR=VALUE:Send
Even when I set the IGNOREERROR YES
Please help
VERSION BUILD=8300326 RECORDER=FX
TAB T=1
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !LOOP 1
URL GOTO=http://bootleggers.us/jail.php
ONDOWNLOAD FOLDER=/Users/dymphi/Desktop/ FILE=image.jpg WAIT=YES
TAG POS=1 TYPE=IMG ATTR=HREF:http://www.google.com/recaptcha/api/image* CONTENT=EVENT:SAVEITEM
TAB OPEN
TAB T=2
URL GOTO=api.deathbycaptcha.com/decaptcher?function=picture2&print_format=html
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.deathbycaptcha.com/decaptcher ATTR=NAME:username CONTENT=dbcname
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.deathbycaptcha.com/decaptcher ATTR=NAME:password CONTENT=dbcpassword
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:http://api.deathbycaptcha.com/decaptcher ATTR=NAME:pict CONTENT=/Users/dymphi/Desktop/image.jpg
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://api.deathbycaptcha.com/decaptcher ATTR=VALUE:Send
TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
TAB CLOSE
TAB T=1
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/jail.php ATTR=ID:recaptcha_response_field CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/jail.php ATTR=VALUE:Continueplaying!
URL GOTO=http://bootleggers.us/jail.php
TAG POS=1 TYPE=A ATTR=TXT:Bustout!
filedelete name=/Users/dymphi/Desktop/image.jpg
WAIT SECONDS=110
I'm also using deathbycaptcha for solving captcha and my code works fine, you should set a timeout before submitting:
URL GOTO=http://api.deathbycaptcha.com/decaptcher?function=picture2&print_format=html
TAG POS=1 TYPE=INPUT ATTR=NAME:username CONTENT=username
TAG POS=1 TYPE=INPUT ATTR=NAME:password CONTENT=pass
TAG POS=1 TYPE=INPUT ATTR=NAME:pict CONTENT=/Users/dymphi/Desktop/image.jpg
SET !TIMEOUT_STEP 30
TAG POS=1 TYPE=INPUT ATTR=TYPE:submit
TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT
TAB CLOSE
TAB T=1
SET !VAR1 {{!EXTRACT}}
I tested it even when the image doesn't exist, my version of iMacros is 8.3.0. Hope it will work.