Cornysz wrote: ↑Sat Jul 17, 2021 1:35 pm
Code: Select all
BUILD=8970419 Freeware
Win 10
Firefox 56
Hello, I want to ask, how to split a string and then fill more than one form?
For Example I have string "blabla:bla" (The string got from inputted PROMPT)
And then I have 2 forms, and the first form filled with blabla, and the second one is filled by bla. So the spllitter is :
This is my code, but I don't know why it get error. I dont really understand function of SET EVAL
Thank you in advance!
Code: Select all
PROMPT "EMAIL:PASS" !VAR1
SET empas EVAL("var Arr = {{!VAR1}}.split(":");")
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:fm-login-id CONTENT={{empas[0]}}
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:fm-login-password CONTENT={{empas[1]}}
Try to select the correct Sub-Forum when you open a Thread, this one has nothing specific to the 'iMacros for FF' one..., I'll move it to the 'Data Extraction' Sub-Forum...
>>>
Alright, yep-yep, I understand your Scenario and you are very close actually with your Implementation
, but you need to use the "[n]" Mechanism to return the n'th Item from an Array (= the Result of the 'split()' Method) still from inside 'EVAL()', but it is not supported at the '.iim' Level with an iMacros Var like you are trying with "{{empas[n]}}"...
=> So you need to use/define 2 separate Vars with 'EVAL()' (x2), => 'empas1' for example to return '[0]' and 'empas2' for '[1]'...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...