lesha_01 wrote:Hello.
I have
Code: Select all
IMacros for Chrome VERSION BUILD=1001,
Chrome 67.0.3396.99.
I always use standart code for multiple selection menu:
Code: Select all
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=NAME:select1 CONTENT=#1:#3:#8
It works fine. But If in menu previously were selected other items (#4 and #5, for example) they are not saved after running this code.
On keyboard I can hold CTRL button to add new items in multiple menu (with saving previously selected items), and how I do this in IMacros?
Your Thread has probably nothing specific to the 'iMacros for CR' Sub-Forum btw..., unless you can mention that you've tested in some other Browser, "correct" Sub-Forum would have been the 'General' one... (for next time, no need to duplicate now...)
Hum..., are you sure you are using v10.0.1 for CR...? (Some v10.0.2 for CR Update was released a few weeks ago...)
And for v10.x, you need to mention as well if you are using the 'Free' or 'PE' (Personal Edition)...
+ OS is missing from your FCI...
['Free'/'PE' + 'OS' shouldn't play a "Role" in this Thread I think, but I usually don't answer Threads if FCI (and the 'F' stands for "Full", read my Sig...) is not mentioned or not complete...
)
>>>
OK, hum, interesting Qt...
, but I'm not surprised by the "Behaviour" you describe...
You probably need to first "save stg" about your first Selection with Items '#4' & '#5' (but it depends a bit on how the Page works I guess), before letting your Script do the Selection '#1:#3:#8'...
You would get the same Behaviour I think if you started typing manually stg in some 'IMPUT' Field, without saving/submitting, and then letting some iMacros Script fill in that same 'INPUT' Field..., the "manual" Content will be replaced by the Content from your Script... (at least with the 'TAG' Mode..., it can be avoided with the 'EVENT' Mode...).
If your '#4:#5' Selection is done manually, then you can "do it" the other way around..., first let iMacros do the Selection for '#1:#3:#8', add a 'PAUSE' to your Script, and only then do the extra manual Selection with '#4:#5'.
If you "really" want to do everything from your Script, you could first try extracting (with 'EXTRACT=TXT') which Item(s) is/are already selected, and using 'EVAL()' to "reconstruct" the Full Selection...
But I'm not sure the 'EXTRACT' will work with multiple already selected Items, I think it only extracts the visible Item in the DDLB... (I've never tried...)
And reconstructing the Full Selection will be a bit "tricky" because the '#' Selector (= 'Select by Index' Selector) must be
outside the Var(s), so you might hit some Limitations if your Nb of Items to select might be variable (sometimes 5, up to say 8, for example), then you might need to "hard-code" always selecting 8 Items, but if you only need 5 out of 8, I'm not sure how iMacros will "behave" with the last 3 "unnecessary" Items, if you repeat some Items or fake-try to select some fake '#99' Item...
I've never needed that "Functionality" for myself, so I've never tried..., and you are the first to ask on the Forum...
Provide the URL to your Site/Page, or to some "Public" Site containing such a Multiple Selection DDLB and I can have a Look..., and try as well a few other "Things" and "Tricks" that I didn't mention...
- (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...