I want to use Imacro to change all database 'user types' for my company - imacros

IMACROS: VERSION BUILD=1010 RECORDER=CR Free version
Windows 10 English
Chrome: Version 90.0.4430.85 (Official Build) (64-bit)
I have close to 7500 'users' in my database. I need to change one, then go to next, etc. I am thinking I need to take the user ID -in the example below that is "7378", and subtract 1 for the next command. I am sure this is easy but I cannot figure it out. Here is what I have that needs to repeat, minus 1, each time:
TAG POS=1 TYPE=TD ATTR=TXT:7378
TAG POS=7 TYPE=BUTTON ATTR=TXT:Edit
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://xxx.xxx.com/admin/users/7378/edit ATTR=TXT:Change
TAG POS=2 TYPE=INPUT:RADIO ATTR=*
TAG POS=1 TYPE=BUTTON ATTR=TXT:OK
TAG POS=1 TYPE=BUTTON ATTR=TXT:Save
Thank you in advance!

Solution for the following FCI:
IMACROS: VERSION BUILD=1010 RECORDER=CR 'Free'
Windows 10 English
Chrome: Version 90.0.4430.85 (Official Build) (64-bit)
(Will work for all 'Free' Versions, using '!VAR[1-3]', as User Defined Vars are not supported in the 'Free' Versions.)
'Set some Start User_ID: (Needs to be +1 from the "real" Start ID.)
SET !VAR1 7379
ADD !VAR1 -{{!LOOP}}
'TAG POS=1 TYPE=TD ATTR=TXT:7378 // (Recorded)
TAG POS=1 TYPE=TD ATTR=TXT:{{!VAR1}}
'>
TAG POS=7 TYPE=BUTTON ATTR=TXT:Edit
'>
'TAG POS=1 TYPE=BUTTON FORM=ACTION:https://xxx.xxx.com/admin/users/7378/edit ATTR=TXT:Change // (Recorded)
TAG POS=1 TYPE=BUTTON FORM=ACTION:https://*/admin/users/{{!VAR1}}/edit ATTR=TXT:Change
'>
TAG POS=2 TYPE=INPUT:RADIO ATTR=*
TAG POS=1 TYPE=BUTTON ATTR=TXT:OK
TAG POS=1 TYPE=BUTTON ATTR=TXT:Save
... And you can loop that Script 100 times (Max Loop Value for the 'Free' Versions).
... And you'll need to manually edit the SET !VAR1 7379 to SET !VAR1 7279 then to 7179 etc before running the next 100 Loops...
Glossary:
FCI = Full Config Info (=> iMacros + Browser + OS + 'Free'/'PE'/'Trial'/'Pro'/'Enterprise' + all exact Versions.)
PE = Personal Edition.
OP = Original Post. // #OP/#OP = Original Poster.
Qt = Question.

Related

iMacros: Script pastes the Text "CONTENT={{!CLIPBOARD}}" rather than the actual Clipboard Content?

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...

iMacro - Firefox - OnDownload not working?

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

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: content extraction issues

I was just wondering if someone could help me out a bit here?
This is my current script:
VERSION BUILD=8810214 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:F1 ATTR=NAME:create_new_folder CONTENT=TEST_{{!LOOP}}
TAG POS=2 TYPE=INPUT:SUBMIT FORM=NAME:F1 ATTR=*
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:F1 ATTR=ID:selall CONTENT=YES
TAG POS=1 TYPE=SELECT FORM=NAME:F1 ATTR=NAME:to_folder CONTENT=%3821
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:F1 ATTR=NAME:to_folder_move
I want to fully automate this.
Modifying the loop based on the content works:
TAG POS=1 TYPE=SELECT FORM=NAME:F1 ATTR=NAME:to_folder CONTENT=%382{{!LOOP}}
But this would run into two problems:
When it reaches 10 folders, the content ID would change to =%383X
The digit I want defining the folder is separate to the content ID and I definitely want it to match the loop. The reason I stated this as an issue, because I considered using the SET !LOOP function but that lead to a load of other problems.
So what I'm thinking is that I would like to check the Content ID of the folder I create, place it into a variable then set it to match.
Something like this:
VERSION BUILD=8810214 RECORDER=FX
TAB T=1
SET !VAR1 {{EXTRACT}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:F1 ATTR=NAME:create_new_folder CONTENT=TEST_{{!LOOP}}
TAG POS=2 TYPE=INPUT:SUBMIT FORM=NAME:F1 ATTR=*
**SOMEHOW EXTRACT THE ID**
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:F1 ATTR=ID:selall CONTENT=YES
TAG POS=1 TYPE=SELECT FORM=NAME:F1 ATTR=NAME:to_folder CONTENT=%{{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:F1 ATTR=NAME:to_folder_move
So how would I go about getting that ID to extract? I can't program like at all, so I'm sorry if my thinking is a bit flawed here.
Any help would be much appreciated!
Oh, and I'm using FireFox in case that has any form of relevance.

iMacros .if .else captcha

Good afternoon! I've a code with bypass captcha service written in iMacros.My problem is..
I need to do that if my captcha is incorrect then to do it again like a loop or if captcha is good then go next part of code.
How can i do that in iMacros.I heard about javascript there but can't make up code.
Please, look at my code.
URL GOTO="my site"
TAG POS=1 TYPE=DIV ATTR=TXT:"my options"
TAG POS=1 TYPE=INPUT:RADIO ATTR=ID:"my options"
wait seconds=2
SET !EXTRACT_TEST_POPUP NO
ONDOWNLOAD FOLDER=C:\Captcha\ FILE=image.jpg WAIT=YES
TAG POS=1 TYPE=IMG ATTR=SRC:"image captcha" CONTENT=EVENT:SAVEPICTUREAS
tab open
tab t=2
URL GOTO="service captcha"
TAG POS=1 TYPE=INPUT ATTR=NAME:pict CONTENT=C:\Captcha\image.jpg
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:"submit send captcha"
ATTR=VALUE:Send
TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT
wait seconds=3
SET !VAR1 {{!EXTRACT}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:account ATTR=ID:Passwd CONTENT="my password"
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:account ATTR=ID:PasswdAgain CONTENT="my
password"
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:account ATTR=ID:Email CONTENT="email"
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:account ATTR=ID:newaccountcaptcha CONTENT={{!var1}}
wait seconds=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:account ATTR=ID:submitbutton
Ok.Some times captcha is incorrect in form and it gives me one message like that
" The characters you entered are wrong " .How can i repeat these steps again with javascript?
I'm only interested in the preventive methods cauze iMacros is interesting analog then other programs.
Thanks you guys.
You have an example here how you can use JavaScript Scripting and make nested loops.
Nested loop in iMacros (2nd loop)