I can't pass the code imacros to javascript - imacros

I use this code in imacros:
VERSION BUILD=8940826 RECORDER=FX
'TAB T=1
'TAB CLOSEALLOTHERS
SET !DATASOURCE C:\abc.txt
SET !DATASOURCE_COLUMNS 3
SET !DATASOURCE_LINE {{!loop}}
SET !TIMEOUT_PAGE 120
URL GOTO=https://www.habbo.es/
TAG POS=1 TYPE=INPUT:EMAIL FORM=NAME:loginForm ATTR=NAME:email CONTENT={{!COL1}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:loginForm ATTR=NAME:password CONTENT={{!COL2}}
'Submit form
TAG POS=1 TYPE=BUTTON FORM=NAME:loginForm ATTR=TXT:Conectar
WAIT SECONDS=3
But when i pass this code to javascript the col1 doesn't work and doesn't do the job. Can someone please help me?

In JS this code
SET !DATASOURCE C:\abc.txt
is written like this
SET !DATASOURCE C:\\abc.txt

Related

How Can i Remove "[EXTRACT] " tag from extracted data in Imacros

I have created this imacros script to scrape usernames via blog-plug, it generates a list of username in this format
[EXTRACT]BlogOne[EXTRACT]
[EXTRACT]BlogTwo[EXTRACT]
[EXTRACT]BlogThree[EXTRACT]
How Can i get the blog list in proper format i.e.
BlogOne
BlogTwo
BlogThree
Here is the Imacros code i wrote to scrape the blogname list
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 10
SET !TIMEOUT_PAGE 10
URL GOTO=http://blog-plug.com/wallofportraits.php
'New tab opened
TAG POS=1 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
ADD !EXTRACT <BR>
TAG POS=2 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
ADD !EXTRACT <BR>
TAG POS=3 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
ADD !EXTRACT <BR>
SET !CLIPBOARD {{!EXTRACT}}
The following line seems to be helpful:
SET !CLIPBOARD EVAL("'{{!EXTRACT}}'.replace(/\\[EXTRACT\\]/g, '');")
Found a Solution on iMacros Forums, This solved my problem :)
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 10
SET !TIMEOUT_PAGE 10
URL GOTO=http://blog-plug.com/wallofportraits.php
'New tab opened
SET !EXTRACT NULL
TAG POS=1 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
SET My_Data {{!EXTRACT}}<BR>
SET !EXTRACT NULL
TAG POS=2 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
ADD My_Data {{!EXTRACT}}<BR>
SET !EXTRACT NULL
TAG POS=3 TYPE=IMG ATTR=SRC:*api.tumblr.com/v2/blog/*/avatar/64 EXTRACT=ALT
ADD My_Data {{!EXTRACT}}<BR>
SET !CLIPBOARD {{My_Data}}

imacro search for word in button and click it

I have this with imacro
VERSION BUILD=8920312 RECORDER=FX
TAB T=1
URL GOTO=http://mycoinads.com/surfbtc.php?btcaddress=19f83eqk1GpgjtTjQeMEEwMrgZtUn29a7S
SET !TIMEOUT_STEP 35
TAG POS=2 TYPE=SPAN ATTR=TXT:*<SP>Click<SP>here<SP>to
SET !TIMEOUT_STEP 10
TAG POS=1 TYPE=A ATTR=TXT:click<SP>here<SP>for<SP>the<SP>next<SP>ad
SET !TIMEOUT_STEP 35
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:collectcredits.php?ad=1624&btcaddress=19f83eqk1GpgjtTjQeMEEwMrgZtUn29a7S&hash=6260c98d8333bbb582fa738a46d62d62&id= ATTR=*
SET !TIMEOUT_STEP 10
TAG POS=1 TYPE=A ATTR=TXT:click<SP>here<SP>for<SP>the<SP>next<SP>ad
But when it needs to press the button Click here to it gives this error
RuntimeError:
element SPAN specified by TXT:*Clickhereto was not found, line 5 (Error code: -921)
Hope someone can help
So that it find the text and clicks it
TAG POS=1 TYPE=* ATTR=TXT:"Your text here"
Try here.

Imacros get downloaded image file name in firefox

I am using imacros in firefox and saving some images and I want to be able to store the saved images names in a variable, but it seems that the code at the end of my code below
SET !EXTRACT {{!DOWNLOADED_FILE_NAME}}
PROMPT {{!DOWNLOADED_FILE_NAME}}
does not work in firefox, only in ie, does anyone no how I can save the filename of the image into a variable for latter use in my imacros script in firefox browser, I prefer not to use ie browser if at all possible
thanks
VERSION BUILD=8881205 RECORDER=FX
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 10
SET !TIMEOUT_TAG 0
SET !WAITPAGECOMPLETE YES
SET !EXTRACT_TEST_POPUP NO
TAB T=1
URL GOTO=http://www.somerandomsite.com
TAG POS=5 TYPE=INPUT:SUBMIT ATTR=*
TAG POS=1 TYPE=IMG ATTR=SRC:http://*.jpg
ONDOWNLOAD FOLDER=C:\Users\pb\Pictures\produts FILE=* WAIT=YES
'Download the picture
TAG POS=1 TYPE=IMG ATTR=SRC:http://*.jpg CONTENT=EVENT:SAVEITEM
TAG POS=2 TYPE=DIV ATTR=CLASS:iv_thumb_image&&TXT:
ONDOWNLOAD FOLDER=C:\Users\pb\Pictures\produts FILE=* WAIT=YES
'Download the picture
TAG POS=1 TYPE=IMG ATTR=SRC:http://*.jpg CONTENT=EVENT:SAVEITEM
SET !EXTRACT {{!DOWNLOADED_FILE_NAME}}
PROMPT {{!DOWNLOADED_FILE_NAME}}

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.

iMacros ondialog conditional statement

I'm trying to make iMacros send me an email, if after login I get a dialog. In this
case its a warning that I should update my password before it expires.
I would like some output to php that I can use to send the email. I'm presently able to get getLastExtract but nothing in the returned array mentions the dialog in any way.
This is the script so far:
CODE: SET !REPLAYSPEED FAST
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=[URL]
SET !EXTRACTDIALOG YES
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:adminLogin ATTR=ID:username CONTENT=[username]
SET !ENCRYPTION NO
ONDIALOG POS=1 BUTTON=NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:adminLogin ATTR=ID:password CONTENT=[password]
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:adminLogin ATTR=VALUE:Login