Simple loop with jQuery, need help

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
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
Post Reply
Namkce
Posts: 5
Joined: Mon Sep 09, 2013 8:44 pm

Simple loop with jQuery, need help

Post by Namkce » Mon Sep 09, 2013 8:57 pm

I'm trying to build a very simple script that requires one line of jQuery to return an integer value to the script so that the script knows how many elements it needs to update. However, I can't seem to figure out how to do it.... the documentation on the iMacro site is not very clear or straight forward, and examples that are shown do not seem to address my issue.

here's exactly what I want:

// The jQuery string below tells me how many elements there are on the page that need to be modified by the macro:

Code: Select all

$("#activeServiceList li").size();
I want to create the following:

Code: Select all

for 1 to n, do 
TAG POS=n TYPE=INPUT:CHECKBOX FORM=NAME:masterPageForm ATTR=ID:allowScheduling CONTENT=NO
That's it... it's one line repeating with only the POS number updating. Should be simple, right?
Yet I can't figure it out with iMacros. Can someone please help?

Edit: This is for VERSION BUILD=8300326
Post Reply