iMacros for CR v10.1.1, 'Free', CR90/91, macOS
basically am trying to automate a process as efficient as possible
this is the inefficient version
SET !ERRORIGNORE YES
WAIT SECONDS=6
TAG POS=1 TYPE=A ATTR=TXT:FNA
WAIT SECONDS=2
SET !TIMEOUT_STEP 1
TAG POS=3 TYPE=A ATTR=TXT:FNS
WAIT SECONDS=60
updated version
VERSION BUILD=1011 RECORDER=CR
URL GOTO=192.168.1.1
SET !ERRORIGNORE YES
WAIT SECONDS=5
SET !TIMEOUT_STEP 9999
TAG POS=1 TYPE=SPAN ATTR=TXT:0:00:**
WAIT SECONDS=65
URL GOTO=192.168.1.1
WAIT SECONDS=8
SET !TIMEOUT_STEP 0
TAG POS=1 TYPE=A ATTR=TXT:FN1
WAIT SECONDS=2
TAG POS=3 TYPE=A ATTR=TXT:FN2
WAIT SECONDS=1000
and basically loop it , but the window that this code is doing its job is limited cause of a countdown but that time is given in the same page the code is executed
this is an exemple of the time
TAG POS=1 TYPE=SPAN ATTR=TXT:1:22:05
if possible i wanna know how to extract the time and use it in a wait command
THANKS
Related
i have a piece of imacros code for sending out Yahoo eMails which works great. But except for pasting content in the body field. I have tried a few other methods using imacros, but i can't get this part to work.
Here is my code. Appreciate any help. :)
VERSION BUILD=844 RECORDER=CR
SET EMAIL "test#test.com"
SET PASS "password"
SET !ERRORIGNORE YES
URL GOTO=https://login.yahoo.com/?.src=ym&.intl=us&.lang=en-US&.done=https%3a//mail.yahoo.com
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:mbr-login-form ATTR=ID:login-username CONTENT={{EMAIL}}
TAG POS=1 TYPE=BUTTON FORM=ID:mbr-login-form ATTR=ID:login-signin
SET !ENCRYPTION NO
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:mbr-login-form ATTR=ID:login-passwd CONTENT={{PASS}}
TAG POS=1 TYPE=BUTTON FORM=ID:mbr-login-form ATTR=ID:login-signin
WAIT SECONDS=3
TAG POS=1 TYPE=SPAN ATTR=ID:yui_3_16_0_ym19_1_*
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:to-field CONTENT=test#gmail.com
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:subject-field CONTENT=test
TAG POS=1 TYPE=DIV ATTR=ID:rtetext
TAG POS=5 TYPE=SPAN ATTR=ID:yui_3_16_0_ym19_1_*
Have you tried using the Event recording mode (iMacros Sidebar - Manage Tab - Settings) for entering the message body? I tried a quick recording myself and found that the following two commands together were successful in filling the message body:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(9)>DIV:nth-of-type(3)>DIV:nth-of-type(4)>DIV:nth-of-type(2)>DIV:nth-of-type(7)>DIV>TABLE>TBODY>TR:nth-of-type(2)>TD>DIV>DIV>DIV:nth-of-type(2)" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV:nth-of-type(9)>DIV:nth-of-type(3)>DIV:nth-of-type(4)>DIV:nth-of-type(2)>DIV:nth-of-type(7)>DIV>TABLE>TBODY>TR:nth-of-type(2)>TD>DIV>DIV>DIV:nth-of-type(2)" CHARS="this is a test"
I'm using the last version of iMacro and of Firefox.
I'm trying to run it so it downloads a .csv into a specific folder on a different drive that's on the network which it does have access to, the machine that is.
However, every time I see to download it, it does it in the default folder.
Now I did change the download folder but, since I need iMacro to also rename it it just won't cut it exactly.
Here's the code. Now I know I inserted a comment in there, I was playing around to make it work.
Thank you.
VERSION BUILD=8890130 RECORDER=FX
TAB T=1
URL GOTO=WEBSITE
FRAME F=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:username CONTENT=USERNAME
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:password CONTENT=PASSWORD
TAG POS=1 TYPE=BUTTON ATTR=TXT:LOG<SP>IN
URL GOTO=WEBSITE
WAIT SECONDS=15
TAG POS=1 TYPE=DIV ATTR=ID:ext-gen1194
TAG POS=1 TYPE=A ATTR=TXT:Today
TAG POS=1 TYPE=SPAN ATTR=ID:button-1030-btnInnerEl
WAIT SECONDS=10
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd}}.csv WAIT=YES
'ONDOWNLOAD FOLDER="\\\\DifferentServer\\path\\path\\path\\path\\path\\" FILE=+{{!NOW:yyyymmdd}}.csv WAIT=YES
WAIT SECONDS=10
TAG POS=1 TYPE=SPAN ATTR=ID:button-1055-btnIconEl
WAIT SECONDS=10
TAB CLOSEALLOTHERS
TAB T=1
TAB CLOSE
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
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).
I'm facing a problem that my imacro script just doesn't continue looping and freezes after a couple of loops, did anyone of you already face such problem?
Here's my script:
SET !TIMEOUT_PAGE 1
SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !LOADCHECK YES
URL GOTO=http://web.stagram.com/tag/fun/
TAG POS=1 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=2 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=3 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=4 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=5 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=6 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
TAG POS=7 TYPE=IMG ATTR=SRC:http://cdn.stagram.com/img/like.png
WAIT SECONDS=8
SET !TIMEOUT_STEP 6
u miss this line of code
SET !LOOP 1