Brendo wrote: ↑Fri Jan 11, 2019 2:14 pm
Hello!
In my code there are numeric values of classes in order of magnification.
Is there a way to simplify the code so as not to copy strings thousands of times?
Example:
Code: Select all
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_1_2 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_1_3 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_2_2 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_2_3 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_3_2 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'some code...
TAG POS=1 TYPE=TD ATTR=CLASS:row_3_3 EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
'etc...
CIM...!
(Read my Sig...)
Hum, being nice as I usually don't answer when FCI is not mentioned, and re-hum..., wondering btw why you opened your Thread in the 'iMacros for FF' Sub-Forum, but yep, simply code one Block and loop it, if you still haven't found the/a Solution by yourself...
=> Like that...:
Code: Select all
TAG POS=1 TYPE=TD ATTR=CLASS:row_{{!LOOP}}_2 EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=CLASS:row_{{!LOOP}}_3 EXTRACT=TXT
=> Or like that...:
Code: Select all
TAG POS={{!LOOP}} TYPE=TD ATTR=CLASS:row_*_2 EXTRACT=TXT
TAG POS={{!LOOP}} TYPE=TD ATTR=CLASS:row_*_3 EXTRACT=TXT
(But this is very "basic" Functionality for iMacros, you should have a look at the '
Command Reference' in the Wiki for a list of all Commands, and at the Demo-Macros...
)
- (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...