Selecting multiple checkboxes from a csv file

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

Post by chivracq » Tue Dec 26, 2017 7:15 pm

JKI wrote:Thank you for your response and time, I hope you had a nice Holiday weekend.

This is the code when clicking on the 7 labels like suggested
=> If you can record clicking on those 7 Labels

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_SnglFam-Detached_label
TAG POS=1 TYPE=TD ATTR=ID:feature_SnglFam-Attached_label
TAG POS=1 TYPE=TD ATTR=ID:feature_Duplex_label
TAG POS=1 TYPE=TD ATTR=ID:feature_Triplex_label
TAG POS=1 TYPE=TD ATTR=ID:feature_Stories_label
TAG POS=1 TYPE=TD ATTR=ID:feature_Measured_label
TAG POS=1 TYPE=TD ATTR=ID:feature_TaxRoll_label
Any thoughts on where to go from here? If you've already dealt with this in other threads if you wouldn't mind linking them I will try to learn from them.
Hum, OK..., so when clicking on a Label, only the 'TAG' Statement for the Label gets recorded...
Usually the Label is "linked" to its corresponding CB and iMacros automatically records the (Toggle) Select/Deselect of the CB.
But when clicking on a Label, does the CB get automatically selected or not...?

And I asked how will you have your Data in the '.CSV'...?
If you have it as "SnglFam-Detached" / ... / "Duplex" / ... / "TaxRoll", then you can use:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
... to uniquely tag a Label.
And if the CB gets automatically selected from a Click on the Label, then that should do the "Trick"...!

If the CB doesn't get automatically selected from a Click on its Label, then you'll need to use Relative Positioning like:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
TAG POS=R-1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_* CONTENT=YES
But...!, BUT-BUT-BUT...!, there is a chance, this will actually select the previous CB in the List and not the one that you exactly want. You would then need to use "Double Relative Positioning" like:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
TAG POS=R-1 TYPE=* ATTR=*
TAG POS=R1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_* CONTENT=YES
... or:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
TAG POS=R1 TYPE=* ATTR=*
TAG POS=R-1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_* CONTENT=YES
And the 'POS=R1' or 'POS=R-1' might maybe even become 'POS=R2' or 'POS=R-2' in your Case because of the 1/3/5/7... Sequence for the CB's on that Page, you'll need to experiment a bit yourself with the Values to get the desired Behaviour...
- (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...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

Post by chivracq » Tue Dec 26, 2017 7:39 pm

Hum..., if (Single) Relative Positioning like in:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
TAG POS=R-1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_* CONTENT=YES
... doesn't work, and you would then need to use Double Relative Positioning..., there might then be a simpler Solution, still using Single Relative Positioning with:

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:feature_{{!COL1}}_label
TAG POS=R1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_* CONTENT=YES
This will actually select the CB's with Even Numbers from 2/4/6/8/... that I suspect are Hidden but 'id_2' will probably do the same "Job" like 'id_1'.

Lots of "if-if-if" as I cannot do any Testing myself on the Page...
- (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...
JKI
Posts: 9
Joined: Wed Nov 09, 2016 8:49 pm

Re: Selecting multiple checkboxes from a csv file

Post by JKI » Thu Dec 28, 2017 4:34 pm

So after experimenting for a while I realized that clicking the label closer to the left of the field actually does do two things. It selects the label as well as the checkbox in one click. Here is the corresponding code. I haven't made any progress yet, does this change anything?

TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_1
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_1 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_3
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_3 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_19
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_19 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_21
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_21 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_65
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_65 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_67
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_67 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_69
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_69 CONTENT=YES
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

Post by chivracq » Thu Dec 28, 2017 6:38 pm

JKI wrote:So after experimenting for a while I realized that clicking the label closer to the left of the field actually does do two things. It selects the label as well as the checkbox in one click. Here is the corresponding code. I haven't made any progress yet, does this change anything?

Code: Select all

TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_1
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_1 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_3
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_3 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_19
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_19 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_21
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_21 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_65
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_65 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_67
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_67 CONTENT=YES
TAG POS=1 TYPE=LABEL FORM=ID:inputform ATTR=ID:lbl_69
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_69 CONTENT=YES
Ah, OK...!, good, exactly like I was saying at/from the beginning..., but hum..., those "parallel" Labels use the same incremental 1/3/5/etc ID's like the CB's, so you cannot use them "directly" "like that" either, you need to check if they have some other Attribute(s) like 'NAME' would be my best guess..., that will use "Duplex" etc..., or again like I already mentioned, you need to use (Double...?) Relative Positioning... Did you try that...? :?:

And you didn't answer..., me asking twice already..., how (do) you "make" your Selection in your '.CSV'...?

You'll need to find the/a "Solution" by yourself as I cannot have a look at the Page myself, Grrr...!! :(
Maybe an Idea if you uploaded an 'HTML Saveas' of that Page to your Thread if you can't come out by yourself..., there is honestly nothing really "complicated" if you understand the "Principle", and I've given you absolutely all Guidelines..., it would take me a few Seconds (hum OK..., a few Minutes maybe if I want to test a few times that it works correctly indeed...) to get your Script working, would be more efficient I think than trying to explain "Things" that I have the "Feeling" you don't really catch, ah-ah..! :wink:
(Needs to be zipped, max 256Kb. Or to your Google Drive if you prefer or if it's >256Kb...) :idea:
- (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...
JKI
Posts: 9
Joined: Wed Nov 09, 2016 8:49 pm

Re: Selecting multiple checkboxes from a csv file

Post by JKI » Sat May 29, 2021 12:00 am

An update to this first original post. As the years have ticked by some of the code seems to have changed with the most recent version of the web form I am trying to fill. There are only slight variations but enough to render the existing codes unusable.

Here is the screenshot of this display:
Image

and the current code:

Code: Select all

VERSION BUILD=12.0.501.6698
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
URL GOTO=https://matrix.swflamls.com/Matrix/Input/InputForm.aspx?c=AAEAAAD*****AQAAAAAAAAARAQAAAEMAAAAGAgAAAAQyMzQ2CgYDAAAAATkNDwYEAAAABk5ldy0xNA0IBgUAAAACMTYNAgYGAAAAATANGgYHAAAAATAKBggAAAAGNTAyMTIzDQQGCQAAAAZBasKlw4sNAgs)
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=2 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=3 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=4 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=5 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=6 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=7 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=8 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=9 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=10 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=11 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=13 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=14 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=15 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=16 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=17 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=18 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=19 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=20 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES

Any advise or help would be greatly appreciated as I am very rusty at this

Thanks a million and I hope you and your family made/makes it through these COVID-19 times safely!!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

Post by chivracq » Sat May 29, 2021 2:04 am

JKI wrote:
Sat May 29, 2021 12:00 am
An update to this first original post. As the years have ticked by some of the code seems to have changed with the most recent version of the web form I am trying to fill. There are only slight variations but enough to render the existing codes unusable.

Here is the screenshot of this display:
Image

and the current code:

Code: Select all

VERSION BUILD=12.0.501.6698
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
URL GOTO=https://matrix.swflamls.com/Matrix/Input/InputForm.aspx?c=AAEAAAD*****AQAAAAAAAAARAQAAAEMAAAAGAgAAAAQyMzQ2CgYDAAAAATkNDwYEAAAABk5ldy0xNA0IBgUAAAACMTYNAgYGAAAAATANGgYHAAAAATAKBggAAAAGNTAyMTIzDQQGCQAAAAZBasKlw4sNAgs)
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=2 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=3 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=4 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=5 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=6 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=7 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=8 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=9 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=10 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=11 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=13 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=14 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=15 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=16 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=17 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=18 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=19 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES
TAG POS=20 TYPE=INPUT:CHECKBOX ATTR=NAME:Input_1362 CONTENT=YES

Any advise or help would be greatly appreciated as I am very rusty at this

Thanks a million and I hope you and your family made/makes it through these COVID-19 times safely!!

Yeah OK, but original Posting in this Thread was from [2016-11] + [2016-12] + [2017-01] + [2017-12], then pfff...!, what do you expect...!?, I've completely forgotten about this Thread, ah-ah...!!

=> CIM as a Start, "treat" your last Post as a "first time posting in an existing Thread, or opening a new Thread", and your FCI has probably changed since 2016 or 2017... (I don't do any "Thinking" / don't answer a Thread until FCI has been mentioned, sorry...!)

=> And pffffff, the (existing) Thread is (very) long..., I don't "feel" like doing the "Thinking" again..., => Post a Summary of "everything", like if you were just starting a New Thread..., that I can sketch the whole Situation/Scenario in just one Post with all Info... :idea:
(Or you'll have to wait until I get the "Motivation" to look at it and read the whole Thread again... But CIM is always a Show-Stopper for me anyway..., was already a Pb in 2016, is still a Pb 5 years later, in 2021, sorry...!)

>>>

And your "Screenshot":

Code: Select all

[img]https://drive.google.com/file/d/1uliWXFCu-99cwiDccHzQTGRyTkSLtsTQ/view?usp=sharing[/img]
=> ... if it's a Screenshot, is not visible on the Forum...
=> Make it as a '.jpg' or '.png' File and upload it directly to the Forum... (Maybe an "Idea" if you read the Forum Rules (again)... :idea: )
- (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...
Post Reply