Code: Select all
iMacros 8.9.7 on FIrefox 45.9.0 ESR on Solaris 11.3 (x64, german)
If possible, I'd like to make iMacros put this birthdate information from one Excel value:
Into these three boxes:
My idea for the two textboxes would be to tell macros only to look at certain characters inside the excel value to put into the appropiate textbox (for example: put characters 7 to 10 into textbox Year)
For the month-Dropdownmenu it'd have to be more complicated, as writing the value "9" (for September) into the dropdownmenu doesnt change it's value. I'd have to write a replacement list into the code so that iMacros knows that "1" = "January" and so forth. Either that or i'd have to tell iMacros that the value "9" means "press the down-arrow key 9 times" which would have the same result.
For reference: Recording manually inputting the desired Value into the three boxes looks like this:
Code: Select all
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_BirthDate_Day CONTENT=22
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_BirthDate_Month CONTENT=%9
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_BirthDate_Year CONTENT=1964
Any help would be greatly appreciated
Yep, you are on the right way and it's not very complicated...
You'll need to use 'EVAL()' to isolate the 3 parts of the Date to fit the 3 Fields on the Site.
You can then use 'substr()' or 'substring()' to isolate each part by their Index like you mention for 'Year' with [7-10], that's a perfect way to do it as the String for the Date in your DataSource always contains 10 Chars thanks to the Day and Month using a leading "0" for [01-09].
(Another Solution would be using 'split()', but your Idea is already perfect...)
For the Month part, I first thought you would need more or less the same Functionality like this other User in this recent Thread
who unfortunately didn't mention their FCI and didn't follow up, so I didn't post my Solution, but nope, not even, your Case is even more simple if you notice that for Septb for example (="09" in your DataSource), the Field on the Site expects "9" when selecting by Value, which means you simply need to convert [01-09] to [1-9] by removing the leading Zero.
Now it's time for you to start using 'EVAL()', ah-ah...! Good luck, but it's not very complicated...
EDIT: 'subStr()' and 'subString()' are completely lowercase..., oops...!
=> 'substr()' and 'substring()' [Corrected...]
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...