Adding the name of the .IIM macro into the extract possible?

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
Post Reply
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Adding the name of the .IIM macro into the extract possible?

Post by vidim » Thu Nov 20, 2014 4:16 pm

Running the latest iMacros Firefox Plugin on
Windows 7
Firefox 33.1.1

So I am extracting the username and password and some other data from the datasource in this shape:
ADD !EXTRACT {{!COL1}},{{!COL2}},{{!COL3}}

Is there any support in the system for extracting the name of the macro as well, to the same CSV?
Reason is that I have 10 different macros running at once, on 10 different Firefox profiles, all writing to the same CSV.
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Re: Adding the name of the .IIM macro into the extract possi

Post by vidim » Thu Nov 20, 2014 5:14 pm

OP here again. Thinking some more about this, correct me if I am wrong please.

Even if there is no built in functionality for this, like {{!EXTRACTMACRONAME}}, maybe there is a way of writing something inside the macro code, like MACRONAME.iim, and then extracting it later. Wish I could figure this out myself, but I am at the limit of my mental capability when it comes to iMacros already :(
additional001
Posts: 175
Joined: Sun Jul 06, 2008 3:24 am

Re: Adding the name of the .IIM macro into the extract possi

Post by additional001 » Thu Nov 20, 2014 6:53 pm

I could be wrong here but I don't see how this is possible with just using iim scripting methods. It's probable however this could be done with another scripting language on top of iim code ie JavaScript or VBS etc. In fact I'm almost positive it is. It is however currently beyond my knowledge to do it. :)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Adding the name of the .IIM macro into the extract possi

Post by chivracq » Thu Nov 20, 2014 8:56 pm

vidim wrote:Running the latest iMacros Firefox Plugin on
Windows 7
Firefox 33.1.1

So I am extracting the username and password and some other data from the datasource in this shape:
ADD !EXTRACT {{!COL1}},{{!COL2}},{{!COL3}}

Is there any support in the system for extracting the name of the macro as well, to the same CSV?
Reason is that I have 10 different macros running at once, on 10 different Firefox profiles, all writing to the same CSV.
"Latest Version" is always vague... => v8.8.7 I reckon...

I don't see the difficulty, you just hard-code it in your Macro(s) and you add it directly to the !EXTRACT either as a Value or a Variable...
- (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...
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Re: Adding the name of the .IIM macro into the extract possi

Post by vidim » Sat Nov 22, 2014 12:45 am

Thanks chivracq.

K, cool that it should be doable. I will make an attempt.

Yes, 8.8.7 is my version. Did not know where the version number could be found.
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Re: Adding the name of the .IIM macro into the extract possi

Post by vidim » Sat Nov 22, 2014 12:16 pm

Reference for posterity.

Yes, this does indeed work.

Just write somewhere in the macro

Code: Select all

SET VAR1 MYREFERENCE
Then when you decide which data to be written to the CSV, just add {{!VAR1}} to it. In my specific case, I want to write out the data from column 6 in the datasource, and add the VAR1, it looks like this

Code: Select all

ADD !EXTRACT {{!COL6}},{{!VAR1}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.txt
and comes out as:
"Col6Content,MYREFERENCE"
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Adding the name of the .IIM macro into the extract possi

Post by chivracq » Wed Nov 26, 2014 1:57 pm

vidim wrote:Reference for posterity.

Yes, this does indeed work.

Just write somewhere in the macro

Code: Select all

SET VAR1 MYREFERENCE
Then when you decide which data to be written to the CSV, just add {{!VAR1}} to it. In my specific case, I want to write out the data from column 6 in the datasource, and add the VAR1, it looks like this

Code: Select all

ADD !EXTRACT {{!COL6}},{{!VAR1}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test.txt
and comes out as:
"Col6Content,MYREFERENCE"
Good, thanks for the neat Follow-up and sharing your Solution...
- (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