Selecting multiple checkboxes from a csv file

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Selecting multiple checkboxes from a csv file

by JKI on Thu Nov 10, 2016 7:50 am

When using a csv file to populate a web form I have several fields that are check boxes and can have more than one selection made. The csv file has the answers in 1 column separated by a ";" (red; white; blue) If I want to check options when imacros populates the form how do I write the code where either 0,1,2 or 3 answers may be selected in the csv file?
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Thu Nov 10, 2016 11:20 am

JKI wrote:When using a csv file to populate a web form I have several fields that are check boxes and can have more than one selection made. The csv file has the answers in 1 column separated by a ";" (red; white; blue) If I want to check options when imacros populates the form how do I write the code where either 0,1,2 or 3 answers may be selected in the csv file?

Hum..., that's a bit of a "low Quality" Thread... => "CIM" as a start, read my Sig...

What you want is documented in the Wiki, so what is the the Problem...?, what have you tried...?, where do you get stuck...?

Mention your FCI + post (a part of) your Script with what you've tried for me to follow up if you don't come any further, and we'll need as well a mini-Sample of your '.CSV' (at least 3 rows) with exact Content (the exact Format is important...), and depending on your FCI, we'll need as well your (OS) Delimiter & Separator Settings (well, in case you are using IE/iMB that use the OS Settings, you are posting in the 'iMacros for FF' Sub-Forum, so I guess you are using iMacros for FF, but many Users post in the "wrong" Sub-Forum, so we can't even take that for granted...)...
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Thu Nov 10, 2016 2:50 pm

Windows 10, Firefox, Imacros add in

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
SET !DATASOURCE jottest.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_112 CONTENT=%Office
TAG POS=1 TYPE=IMG ATTR=SRC:http://mfr.mlsmatrix.com/Matrix/images/calendarIcon.gif
FRAME F=1
TAG POS=1 TYPE=A ATTR=ID:todays_date
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_114 CONTENT={{!COL29}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_113 CONTENT={{!COL30}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_320 CONTENT=%LimitedServiceEA
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_122 CONTENT=%SN
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_120 CONTENT=%None
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_103 CONTENT=%NotApplicable
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_74 CONTENT=%0

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_1480 CONTENT={{!COL32}}


TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl02_lbPageLink
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_76_{{!COL33}} CONTENT=YES

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{!COL34}} CONTENT=YES

I cant figure out how to get all the selections from the csv checked on the form since the csv file has only 1 row with multiple answers in 1 column separated with a "; ". I get this error "element INPUT specified by ID:Input_95_{{!COL34}} was not found, line: 24 (Error code: -921)" See attached screenshot and since you cannot upload a csv file you can get it at https://drive.google.com/file/d/0B1N0G0V2dQcdRThkNVRsdG8wTUU/view?usp=sharing

TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink
Attachments
My Florida Regional MLS.png
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Thu Nov 10, 2016 5:16 pm

JKI wrote:
Code: Select all
Windows 10, Firefox, Imacros add in


Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
SET !DATASOURCE jottest.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_112 CONTENT=%Office
TAG POS=1 TYPE=IMG ATTR=SRC:http://mfr.mlsmatrix.com/Matrix/images/calendarIcon.gif
FRAME F=1
TAG POS=1 TYPE=A ATTR=ID:todays_date
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_114 CONTENT={{!COL29}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_113 CONTENT={{!COL30}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_320 CONTENT=%LimitedServiceEA
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_122 CONTENT=%SN
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_120 CONTENT=%None
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_103 CONTENT=%NotApplicable
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_74 CONTENT=%0

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_1480 CONTENT={{!COL32}}


TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl02_lbPageLink
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_76_{{!COL33}} CONTENT=YES

[color=#FF4000]TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{!COL34}}  CONTENT=YES[/color]


I cant figure out how to get all the selections from the csv checked on the form since the csv file has only 1 row with multiple answers in 1 column separated with a "; ". I get this error "element INPUT specified by ID:Input_95_{{!COL34}} was not found, line: 24 (Error code: -921)" See attached screenshot and since you cannot upload a csv file you can get it at https://drive.google.com/file/d/0B1N0G0V2dQcdRThkNVRsdG8wTUU/view?usp=sharing

Code: Select all
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink

OK, that's much-much better, even if you didn't understand the "F" in "FCIM" which stands for "Full" = "with all Versions", as the iMacros for FF and the FF Versions are missing. I see v9.0.3 from your Script, OK, pretty buggy btw, you should go back to v8.9.7. And FF will be FF47/49 I reckon...

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{!COL34}} CONTENT=YES

Well, it's much easier now to understand your Case, and hum, mini-Mistake from my Side in my previous Reply, I misread "Checkbox" for "DDLB" (= 'SELECT' Elements) as the Section in the Wiki I pointed you to was meant in my mind for multiple Selections for DDLB's... (But I normally don't even read a Thread when FCI is missing, so I read it "diagonally"...)

Yep about uploading a '.CSV' to a Thread, it's not "directly" possible, the Forum Software only accepts Images or Zipped Files (Max 256Kb), but for just a few Rows, it's usually even more straightforward to copy those 3 Rows directly in your Post using a 'QUOTE' or 'CODE' Tag:
Col_34 / AH:
Code: Select all
Pool Type
AboveGround; AutoCleaner; ChildSafetyFence; DivingBoard; PoolSweep

Hum..., so OK, from your '.CSV' File, in this case, you need to select 5 CB's from the about 25 Max I count from your Screenshot.

You will need to code as many 'TAG' Statements as the Max Number of CB's you expect to need to be checked, the Max-Max Nb being the max Nb of CB's (=25).
You will need to check that they all start with "Input_95_", but this is the way to go, well..., one way to go, there are always several ways to go in iMacros, ah-ah...! I'll mention another one at the end of my Post.

But, hum, can you already check that they indeed really all start with "Input_95_", meaning ""Input_95_AboveGround", "Input_95_AutoCleaner", "Input_95_ChildSafetyFence" etc..., and not that the 95 gets incremented for each next CB, meaning "Input_96_AutoCleaner", "Input_97_ChildSafetyFence" etc...?
I'm trying to make just one block of Code that you can copy and paste as many times as you expect the Max Nb of CB's need to get checked and that plays a role...
Last edited by chivracq on Thu Dec 21, 2017 1:15 pm, edited 1 time in total.
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Thu Nov 10, 2016 7:42 pm

Thank you kindly for your response!

I went in and recorded the form when all possible options are selected. Business rules allow only 8 to be selected upon form submission however. Here is the recorded code:
Code: Select all
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_AboveGround CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_AutoCleaner CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_ChildSafetyFence CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_DivingBoard CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_FiberGlass CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_HeatedSpa CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Inside CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_PoolSweep CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Other CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_OtherWaterFeatur CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_InfinityEdge CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_InGround CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SaltWater CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_OutsideBathAcces CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_ScreenEnclosure CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarCover CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarHeatedPool CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarPoweredPump CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Spa CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Tile CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Vinyl CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_GuniteConcrete CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_HeatedPool CONTENT=YES


TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_83 CONTENT=15x15
TAG POS=1 TYPE=TD ATTR=TXT:Pool<SP>Dimensions


i hope this helps. If you need anything additional i can supply it

Thanks!!
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Thu Nov 10, 2016 10:23 pm

JKI wrote:Thank you kindly for your response!

I went in and recorded the form when all possible options are selected. Business rules allow only 8 to be selected upon form submission however. Here is the recorded code:
Code: Select all
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_AboveGround CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_AutoCleaner CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_ChildSafetyFence CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_DivingBoard CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_FiberGlass CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_HeatedSpa CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Inside CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_PoolSweep CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Other CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_OtherWaterFeatur CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_InfinityEdge CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_InGround CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SaltWater CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_OutsideBathAcces CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_ScreenEnclosure CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarCover CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarHeatedPool CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_SolarPoweredPump CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Spa CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Tile CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_Vinyl CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_GuniteConcrete CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_HeatedPool CONTENT=YES


TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_83 CONTENT=15x15
TAG POS=1 TYPE=TD ATTR=TXT:Pool<SP>Dimensions


i hope this helps. If you need anything additional i can supply it

Thanks!!

OK, perfect...! 23 CB's, I was not far with my 25 guess... And Max 8 Selections is a good news, ah-ah...! Even if there are more than 8 Entries in your '.CSV', I will only take the first 8 ones, which will prevent the Form from failing on the Validation anyway...

You will then need to replace the "incriminated" Line":
Code: Select all
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{!COL34}} CONTENT=YES
with...:
Code: Select all
'Select Max 8 'Pool Type' Checkboxes:
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET Pool_CB_Nb -1
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
'>
'Etc, need to copy Block 8 times in total...
'>
SET !ERRORIGNORE NO

Yep, it should work, I could not really test in the same Conditions like you because I don't really have your '.CSV' File. A "GoogleDocs" Version is a bit different from your "physical" Version on your local System, and I couldn't test the Script on the Web-Page.
Pay attention to the first and last Entries which might fail if some Delimiter Double Quotes are taken into account, or if the last Entry has some trailing Space.

This is the Script I used to test for myself...:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1

'AboveGround; AutoCleaner; ChildSafetyFence; DivingBoard; PoolSweep

SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET Pool_CB_Nb -1
SET COL34 "AboveGround; AutoCleaner; ChildSafetyFence; DivingBoard; PoolSweep"
'SET COL34 ""

'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
'PAUSE
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
'>
ADD Pool_CB_Nb 1
SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{COL34}}'; var z=c.split('; '); z[n];")
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
PROMPT _{{COL34}}_<BR><BR>_{{Pool_CB_Nb}}_<BR>_{{Option_Pool_CB}}_
(Tested using iMacros for FF v8.8.2, Pale Moon v26.3.3. (=FF47), Win10-x64.)

It is possible to speed up the Process a little bit by removing the 'ADD' Statements and using directly z[0] / z[1] / ... / z[7] in the 'EVAL()' Statements but I chose for some "easy" Copy&Paste of the same Block instead... (You can call it "Automating the Automation", ah-ah...!)

And hum, the other Thread I wanted to refer you to could have been useful if you actually wanted to check all 23 CB's but this is not the case, so I guess it is less relevant than I thought...
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Fri Nov 11, 2016 2:28 pm

Thank you!! it works!! Just one issue, it throws an error when it goes to the very next line of code after the checkbox code has finished. Its almost like a stop or charge or end checkbox code needs to proceed it. Any ideas? See code:
Code: Select all
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl02_lbPageLink
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_76_{{!COL33}} CONTENT=YES

    'Select Max 8 'Pool Type' Checkboxes:
    SET !ERRORIGNORE YES
    SET !TIMEOUT_STEP 0
    SET Pool_CB_Nb -1
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    'Etc, need to copy Block 8 times in total...
    '>
    SET !ERRORIGNORE NO

TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink


TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl08_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_374 CONTENT=%MasterBed
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Fri Nov 11, 2016 4:16 pm

JKI wrote:Thank you!! it works!! Just one issue, it throws an error when it goes to the very next line of code after the checkbox code has finished. Its almost like a stop or charge or end checkbox code needs to proceed it. Any ideas? See code:
Code: Select all
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl02_lbPageLink
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_76_{{!COL33}} CONTENT=YES

    'Select Max 8 'Pool Type' Checkboxes:
    SET !ERRORIGNORE YES
    SET !TIMEOUT_STEP 0
    SET Pool_CB_Nb -1
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    ADD Pool_CB_Nb 1
    SET Option_Pool_CB EVAL("var n='{{Pool_CB_Nb}}'; var c='{{!COL34}}'; var z=c.split('; '); z[n];")
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    'Etc, need to copy Block 8 times in total...
    '>
    SET !ERRORIGNORE NO

TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl08_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_374 CONTENT=%MasterBed

OK, good to hear, even if I had a "good feeling"... :D 8)

Hum, you can now remove the "etc... need to copy..." Line, was meant for you, ah-ah...! :shock:

But for your new Pb, dunno really, I've reactivated '!ERRORIGNORE' after the whole Block dealing with all 8 Pool CB's, I guess you always had this Issue, but the Compiler was already stopping at the previous Line about the CB's..., and "it throws an error" is always vague, what is the Error?, that's the Purpose of '!ERRORIGNORE'...!? :roll:

'!ERRORIGNORE' = NO and 'PROMPT' to check/follow your Variables are your best Friends to debug a Script...! :idea:

So, this Line is problematic, but what is the Pb...?:
Code: Select all
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink

And of course, I already have some "Idea(s)", but without direct Access to that Site, I have to remain "Generic" and mention 5 possible Reasons each time, each with 5 possible Answers/Reactions so it exponently grows very quickly, can't you share the URL...?, that would speed up the Process, and I could test directly...?
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Mon Nov 14, 2016 1:12 pm

The error comes up on the second line of code after the checkbox code that you kindly provided
Code: Select all
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    'Etc, need to copy Block 8 times in total...
    '>
SET !ERRORIGNORE NO   

TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink

[i]this is where the issue occurs[/i]

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
Here is the error: "element INPUT specified by ID:Input_194 was not found, line: 70 (Error code: -921)" however I know this line is correct because if you remove the whole section about the check boxes it works and continues on. I can give you the url but it is heavily secured and you do not have a log in. Unfortunately I cant give you one without loosing my license

This code runs all the way to the end
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
SET !DATASOURCE jottest.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_112 CONTENT=%Office
TAG POS=1 TYPE=IMG ATTR=SRC:http://mfr.mlsmatrix.com/Matrix/images/calendarIcon.gif
FRAME F=1
TAG POS=1 TYPE=A ATTR=ID:todays_date
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_114 CONTENT={{!COL29}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_113 CONTENT={{!COL30}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_320 CONTENT=%LimitedServiceEA
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_122 CONTENT=%SN
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_120 CONTENT=%None
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_103 CONTENT=%NotApplicable
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_74 CONTENT=%0

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_1480 CONTENT={{!COL32}}


TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink



TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl08_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_374 CONTENT=%MasterBed
TAG POS=1 TYPE=A ATTR=ID:_Input_396_more
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_374 CONTENT=%Kitchen
TAG POS=1 TYPE=A ATTR=ID:_Input_396_more
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_374 CONTENT=%LivingRoom

TAG POS=1 TYPE=TD ATTR=TXT:LBX_Control.addControl('_Input_396__REPEAT0_375',new<SP>LBI_*
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_375 CONTENT=%1st
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_375 CONTENT=%1st
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_375 CONTENT=%1st

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_376 CONTENT={{!COL95}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_377 CONTENT={{!COL96}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_376 CONTENT={{!COL98}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_377 CONTENT={{!COL99}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_376 CONTENT={{!COL101}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_377 CONTENT={{!COL102}}
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl10_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_237 CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_240 CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_245 CONTENT=%0
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl12_lbPageLink
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_270 CONTENT={{!COL26}}
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Mon Nov 14, 2016 1:57 pm

JKI wrote:The error comes up on the second line of code after the checkbox code that you kindly provided
Code: Select all
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:Form1 ATTR=ID:Input_95_{{Option_Pool_CB}} CONTENT=YES
    '>
    'Etc, need to copy Block 8 times in total...
    '>
SET !ERRORIGNORE NO   

TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink

[i]this is where the issue occurs[/i]

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
Here is the error: "element INPUT specified by ID:Input_194 was not found, line: 70 (Error code: -921)" however I know this line is correct because if you remove the whole section about the check boxes it works and continues on. I can give you the url but it is heavily secured and you do not have a log in. Unfortunately I cant give you one without loosing my license

This code runs all the way to the end
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
SET !DATASOURCE jottest.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_112 CONTENT=%Office
TAG POS=1 TYPE=IMG ATTR=SRC:http://mfr.mlsmatrix.com/Matrix/images/calendarIcon.gif
FRAME F=1
TAG POS=1 TYPE=A ATTR=ID:todays_date
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_114 CONTENT={{!COL29}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_113 CONTENT={{!COL30}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_320 CONTENT=%LimitedServiceEA
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_122 CONTENT=%SN
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_120 CONTENT=%None
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_103 CONTENT=%NotApplicable
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_74 CONTENT=%0

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_1480 CONTENT={{!COL32}}


TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink



TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_195 CONTENT={{!COL76}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_196 CONTENT={{!COL77}}
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_199 CONTENT=%Publicrecords
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl08_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_374 CONTENT=%MasterBed
TAG POS=1 TYPE=A ATTR=ID:_Input_396_more
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_374 CONTENT=%Kitchen
TAG POS=1 TYPE=A ATTR=ID:_Input_396_more
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_374 CONTENT=%LivingRoom

TAG POS=1 TYPE=TD ATTR=TXT:LBX_Control.addControl('_Input_396__REPEAT0_375',new<SP>LBI_*
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_375 CONTENT=%1st
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_375 CONTENT=%1st
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_375 CONTENT=%1st

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_376 CONTENT={{!COL95}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT0_377 CONTENT={{!COL96}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_376 CONTENT={{!COL98}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT1_377 CONTENT={{!COL99}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_376 CONTENT={{!COL101}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:_Input_396__REPEAT2_377 CONTENT={{!COL102}}
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl10_lbPageLink
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_237 CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_240 CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:Form1 ATTR=ID:Input_245 CONTENT=%0
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl12_lbPageLink
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_270 CONTENT={{!COL26}}

Hum, OK for URL and Login, but tricky Detective Work then, a bit like if you are in some forest full of trees (sounds logical, so far...!) and I am blind but I have to guide you and try to make you avoid banging your head on all the trees, oops...!, ah-ah...!!

OK, let's try...! So, this is the "faulty" Line;
Code: Select all
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:Input_194 CONTENT={{!COL75}}

From your GoogleDocs '.CSV', Col_75 seems to be Col_BW, if I count correctly in Base_26, Thanks to the Weirdo at MS who designed this stupid System for counting Cols in a Spreadsheet, grrr...!!, ah...!, but OK, that's the purpose as well of your 3rd Row I realize now, ah-ah...!
Code: Select all
Bedrooms   Full Baths   Half Baths   Sq Ft Heated   Total Building Sq Ft   Source of Sq Ft info
1   1   0   660   780   Public Records
75               

Hum, 'Bedrooms', so that means that the previous Statement:
Code: Select all
TAG POS=1 TYPE=A ATTR=ID:m_rpPageList_ctl06_lbPageLink
... made you switch to the 'Rooms' Tab I guess...

Set '!TIMEOUT_STEP' back to some "slower" Value, I would say, after the Pool_CB's Section as I had to set it to "0" to avoid some very long waiting if you wanted to check less than 8 CB's, Default Value is "6" (based on Default Value = "60' sec for '!TIMEOUT_PAGE' if you haven't modified it in your General iMacros Settings), otherwise the Page probably doesn't have the time to switch to that 'Rooms' Tab. That should do the Trick I guess.
And just to make sure, you could repeat/force the 'FRAME F=0' again each time your Script switches to a different Tab, and/or try with 'FRAME F=1', but I think 'F=0' is the correct Frame and the Pb comes from the too short '!TIMEOUT_STEP' Setting...
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by ompaydisgen on Thu Jan 12, 2017 11:52 am

Hello, all
I beg for help. I was about to enter the data into our web Baset, but the order in which iMacros, I wanted to check cekbox available on our web Baset. corresponding to that of the colom categories: colom 12 only on each row of data that exist on a csv file

The following lmpiran screnshot, of the problems that I face right now, and I ask you all to help

Scren Shot Hire :
New Item Menu http://prntscr.com/dut7f5

Imacros Editor : http://prntscr.com/dut8er

CSV file kategory only : http://prntscr.com/dutaq3

please Help Me
ompaydisgen
 
Posts: 1
Joined: Thu Jan 12, 2017 12:59 am

Re: Selecting multiple checkboxes from a csv file

by chivracq on Thu Jan 12, 2017 12:27 pm

ompaydisgen wrote:Hello, all
I beg for help. I was about to enter the data into our web Baset, but the order in which iMacros, I wanted to check cekbox available on our web Baset. corresponding to that of the colom categories: colom 12 only on each row of data that exist on a csv file

The following lmpiran screnshot, of the problems that I face right now, and I ask you all to help

Scren Shot Hire :
New Item Menu http://prntscr.com/dut7f5

Imacros Editor : http://prntscr.com/dut8er

CSV file kategory only : http://prntscr.com/dutaq3

please Help Me

Hum..., Post approved because no Spam and Legit, but pfff, you can better open your own Thread (in the 'General' Sub-Forum) as the existing Thread you are posting in was very dependent on the HTML Structure of a specific Site and any Solution for your Site won't have much/anything in common with this existing Thread...
You can refer to it with a direct Link to show that you did a bit your "Homework" by searching the Forum but it will be less "messy" if you open your own Thread...
=> And I would already have a few Remarks, everything I posted in my first Reply in this current Thread applies to you as well, so OK, you did a bit your Homework but you obviously didn't really read the Content of this Thread...! :roll:
=> CIM...! :mrgreen: and all the "rant" about "low quality", while you tried to put some effort in your Post, but you can post your Screenshots directly on the Forum and in your Thread, there is normally no need to use some external Site, and I won't be looking at some Code/Script from a Printscreen, you can enclose it directly into your Post in plain Text using the ]CODE[ Forum Meta-Tags...
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Thu Dec 21, 2017 1:03 pm

Hello again chivracq it has been a while since we last spoke. I hope you don't mind me reviving this thread, but I've ran into an issue that relates to my original post. Would it be better to start a discussion here, or should I create a brand new thread? I think it would be easiest to review this thread as most of the information is still relevant.

My new CIM:

- Firefox 55.0b9 (32-bit)
- VERSION BUILD=9030808 RECORDER=FX
- Windows 10 Pro 64-bit

First I have to thank you for the help three years ago, the info you provided has served me very well. However I'm re-opening this thread today because I've run into a new set of related issues. We started using a new webform in addition to our original one, and now the macro I have written does not function properly. The original code can be seen in the above responses, so I'm not sure if I should resubmit it?

Anyway my new problem is this: Every choice in the new check box's on this new webform has its own unique input ID. This is what the code looks like when making 6 selections in the new checkbox:

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_1 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_3 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_19 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_21 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_65 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_67 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_69 CONTENT=YES

and this is what it looks like on the webform

https://drive.google.com/file/d/1dpx-3j ... sp=sharing

This is vastly different to the checkboxes on the original webform and the code that accompanied it. Honestly I'm not sure how to move forward. Any help or advice would be greatly appreciated, your help in the past did so much for me.
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Re: Selecting multiple checkboxes from a csv file

by chivracq on Sat Dec 23, 2017 9:06 am

JKI wrote:Hello again chivracq it has been a while since we last spoke. I hope you don't mind me reviving this thread, but I've ran into an issue that relates to my original post. Would it be better to start a discussion here, or should I create a brand new thread? I think it would be easiest to review this thread as most of the information is still relevant.

My new CIM:
Code: Select all
- Firefox 55.0b9 (32-bit)
- VERSION BUILD=9030808 RECORDER=FX
- Windows 10 Pro 64-bit


First I have to thank you for the help three years ago, the info you provided has served me very well. However I'm re-opening this thread today because I've run into a new set of related issues. We started using a new webform in addition to our original one, and now the macro I have written does not function properly. The original code can be seen in the above responses, so I'm not sure if I should resubmit it?

Anyway my new problem is this: Every choice in the new check box's on this new webform has its own unique input ID. This is what the code looks like when making 6 selections in the new checkbox:

Code: Select all
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_1 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_3 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_19 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_21 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_65 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_67 CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:inputform ATTR=ID:i_69 CONTENT=YES


and this is what it looks like on the webform

https://drive.google.com/file/d/1dpx-3j ... sp=sharing
checkboxes.JPG


This is vastly different to the checkboxes on the original webform and the code that accompanied it. Honestly I'm not sure how to move forward. Any help or advice would be greatly appreciated, your help in the past did so much for me.

Oh yeah..., that "interesting" Thread about "avoiding banging your head in a forest full of trees" and that cumbersome "Base 26 System", Okay...
Hum, you could have posted your final Script last year after my last Post from that time, but OK, never mind...
Hum, and it was 1 year ago, not 3, ah-ah...!

Is fine to reuse the same Thread indeed, I would think, makes it easier to understand the "whole picture"...

OK, Script posted about those 7 CB's (and not 6, confirmed by Screenshot), hum..., I can't do much from a Screenshot btw..., and I can only give some "generic" Advice if I cannot play with the Page myself, but OK...

=> The CB ID's seem to use 1-3-5-7-9-...etc for the 'POS=n', it will be possible to dynamically extract/compute that ID or "Position" for each CB on the Page, I've already posted several times a Method I use for Dynamic ID's in a few Threads on the Forum, but there might be an easier way here...

But hum..., how will you be "preparing" the CB-Selection in your '.CSV'...? If you use the exact same Spelling like on the Web-Page (=> "Duplex" for example for the 'Duplex' CB with ID='i_19'), then you can probably use it directly on the Label for each CB.
=> If you can record clicking on those 7 Labels (hum..., seems like there is no Data Validation btw on that Form, with the "Select 1 item" but you can select more than 1...), iMacros should record 2 Lines, one for the Label and one for the CB and the CB will automatically get selected as well.
It's then possible to only keep the 'TAG' on the Label which will be possible to locate using the "Duplex" etc Content.
If the CB doesn't get automatically selected from the Click on the Label or if the Statement on the CB is still required, Relative Positioning could then be used, but with CB's and their Label, you often need Double Relative Positioning or you end up selecting the previous or the next CB instead of the one corresponding to its Label. I've demonstrated the Method in a few other Threads if you need that, and applied to CB's as well...
- (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...
chivracq
 
Posts: 6692
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Selecting multiple checkboxes from a csv file

by JKI on Tue Dec 26, 2017 10:29 am

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

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.
JKI
 
Posts: 8
Joined: Wed Nov 09, 2016 1:49 pm

Next

Return to iMacros for Firefox

Who is online

Users browsing this forum: Google [Bot] and 6 guests

-->