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
Related
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
I am trying to get iMacros for Firefox (v10.0.2) to copy/paste data, the copying side is working (as confirmed by iMacros pop-ups) but when pasting instead of pasting the Clipboard content, it's actually pasting "CONTENT={{!CLIPBOARD}}" (without the quotation marks).
This is my Script...:
FRAME F=0
TAG POS=1 TYPE=SPAN ATTR=ID:resultsdivsml EXTRACT=TXT
TAB T=1
FRAME F=12
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:msku-custom-option-input CONTENT={{!CLIPBOARD}}
TAG POS=1 TYPE=A ATTR=ID:msku-custom-option-add
My Config Info:
iMacros version = 10.0.2.1450
Firefox version = 70.0.1 (64bit)
Win 10 (64bit)
Any help greatly appreciated.
Good Quality for your Qt, this is pretty "rare" on this Forum for 'iMacros' Qt's... (+1 from me...)
Like mentioned/explained in your parallel Thread on the iMacros Forum:
https://forum.imacros.net/viewtopic.php?f=11&t=30705&p=84161#p84154
=> I think you are hitting a Bug actually, but that's not "really" the Functionality that you want...
(The Thread on the iMacros Forum contains more Info, I'm only posting a "simplified"/shortened Answer on this Forum...)
In order to paste the Content of the 'EXTRACT', you need to use the '{{!EXTRACT}}' Command (and not '{{!CLIPBOARD}}' like you are currently doing)...
And if you do several 'C&P' in your Script, you each time need to reset the '!EXTRACT' Built-in Var before each 'EXTRACT':
VERSION BUILD=10021450
FRAME F=12
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=A ATTR=ID:msku-attribute-add
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:msku-own-parent-tag-checkbox CONTENT=YES
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:msku-custom-parent-attribute-input CONTENT=Sticker<SP>Size
TAG POS=1 TYPE=BUTTON ATTR=ID:msku-add-parent-tag-btn
TAG POS=1 TYPE=A ATTR=ID:msku-custom-option-link
TAB T=2
FRAME F=0
SET !EXTRACT NULL
TAG POS=1 TYPE=SPAN ATTR=ID:resultsdivsml EXTRACT=TXT
TAB T=1
FRAME F=12
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:msku-custom-option-input CONTENT={{!EXTRACT}}
TAG POS=1 TYPE=A ATTR=ID:msku-custom-option-add
TAB T=2
FRAME F=0
SET !EXTRACT NULL
TAG POS=1 TYPE=SPAN ATTR=ID:resultsdivstd EXTRACT=TXT
TAB T=1
FRAME F=12
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:msku-custom-option-input CONTENT={{!EXTRACT}}
TAG POS=1 TYPE=A ATTR=ID:msku-custom-option-add
... etc...
Grrr..., and this Site is Buggy again, the Toolbar with all Formatting Icons (Bold/Italic/Code/etc...) has now kind of disappeared and is just Blank...! (PM v26.3.3) => I have to use a different Browser (FF v55.0.3) to be able to post this Answer...
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
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 am tring to capture a table using CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT. My webpage is continuously getting refreshed as it gives live records due to which m facing problem, as
Imacro waits for webpage to get loaded. Can anyone please help me I am very new to Imacro and coding.
My code looks like this:
VERSION BUILD=8850919 RECORDER=FX
TAB T=1
URL GOTO=about:home
URL GOTO=http://10.1.0.100/
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:txt_usr_name CONTENT=*****
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:txt_password CONTENT=*******
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:form0 ATTR=ID:btn_logon
FRAME NAME="bottomLeftFrame"
TAG POS=1 TYPE=SPAN ATTR=TXT:Maintenance
TAG POS=1 TYPE=SPAN ATTR=TXT:Statistics
TAG POS=1 TYPE=TABLE ATTR=ID:list_table&TXT: CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
FRAME NAME="bottomLeftFrame"
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=SPAN ATTR=ID:t_menu_logout
I have tried this method in my other webpages it worked perfectly as expected.
Thanks in advance
Try to see if this works. You have to put the download folder location in order for it to work.
VERSION BUILD=8850919 RECORDER=FX
TAB T=1
URL GOTO=about:home
URL GOTO=http://10.1.0.100/
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:txt_usr_name CONTENT=*****
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:txt_password CONTENT=*******
TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:form0 ATTR=ID:btn_logon
FRAME NAME="bottomLeftFrame"
TAG POS=1 TYPE=SPAN ATTR=TXT:Maintenance
TAG POS=1 TYPE=SPAN ATTR=TXT:Statistics
ONDOWNLOAD FOLDER=C:\ FILE=screenshot.png
TAG POS=1 TYPE=TABLE ATTR=ID:list_table&TXT: CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
FRAME NAME="bottomLeftFrame"
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=SPAN ATTR=ID:t_menu_logout