vlady_2009 wrote:I tried using !LOOP but this only gives a single iteration (with a warning dialog about the default being 1 etc) and using the HTML example from above post, results in "11,723" in the .csv file. If I use the Play (loop) control (and set the repeat macro to 2 or 3) this then results in "4,180" or "11,089" respectively in the .csv file (ie the text from the relative position of the TD element). Similar if I use myloop and define the variable etc. I only get a "relative" step/search for TYPE=TD upto the !ENDOFPAGE for whatever relative "step size", but not the desired extract of each instance of a TD (eg in the case that !LOOP = 1) upto the !ENDOFPAGE mark.
It seems I am misunderstanding what !ENDOFPAGE (coupled with the anchor tag and the R{{!LOOP}} ... lines) is suppose to enable.
The desired functionality is that a particular set of tags without distinguishing characteristics (in this case a series of <TD>) of which there is an unknown variable number between two other tags but which these two can be determined a priori (eg through txt attribute), can be cycled through and the text attribute extracted from each.
Only using iMacro for a few days, so any advise appreciated.
Well, if you use any Loop Mechanism, then yep, you need to play your Macro from the 'Play (Loop)' Button, and to specify a Number in the 'Max' Field which is at least the same or higher than the Nb of Rows you can expect on the Page, say 10 for example for your Source with "only" 3 Rows, then I expect the Macro will stop at the 3rd or 4th Loop with some RuntimeError saying stg about "End of Page reached, aborting Macro...".
I never had a chance to use/test that Functionality as it is not implemented for iMacros for FF... (Even if I have an easy Workaround for FF that I have posted in
this Thread... (Hum, is already nearly 2 years old, I still remember that Thread pretty clearly, was an interesting one, ah-ah...!))
But hum, '!ENDOFPAGE' is meant for the Macro to stop if you have a 2nd Table with Rows with the same Attributes like in Table_1 that would get also extracted otherwise, but if on your Page/Site you only have one Table with 3 Rows and 'TAG POS=4' won't find anything anyway, then you could simply add a "real" TAG on the same Field you want to extract (before the 'EXTRACT') and at Loop=4, your Macro will automatically abort with a RuntimeError telling you that 'TAG POS=4 ...' was not found (without using '!ERRORIGNORE' of course...), and you'll know that it ran and extracted correctly the first 3 Rows...
But hum, mini-Remark..., how come if you've been using iMacros for IE since only a few days, that you are using v10.x, v10.0.3 I reckon, which is already about 5 or 6 years old, while the current/latest Version is now v12.0...?
- (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...