Feature Requests & Bug Fix Requests. ADD YOURS!

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
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by Cybes » Mon Oct 06, 2014 12:03 pm

Originally raised this post as a query but given the lack of responses it appears there isn't currently a way to do this in iMacros so i'm raising a request.

Could we please have an ability to define a column number (referencing a column within a CSV source file) as a variable instead of using a hard-coded / static number there.

e.g. Something that might look like.. {{!COL{{!VAR1}}}} (or if there is a neater alternative that'd be good too!)

This would allow me to dynamically target a specific cell within a CSV. I know you can define a row number as a variable via the DATASOURCE_LINE command (e.g. SET !DATASOURCE {{!VAR1}}).

I am attempting to have different CSV files cross-reference each other to make my scripts as easily maintainable and as easy to follow as possible. So i'm already using different CSV files to cross-reference row numbers in other CSVs, but the limit there is rows, not columns. If column was supported too you could simply define row X column Y another CSV document and create a whole range of combinations off the back of this.

So if iMacros could support variables for !COL as well via it's scripting language this would be appreciated!

Config Info: iMacros Firefox Plug-in / Version: 8.8.x - Firefox 32.0.2 (OS X 10.8.5)
Last edited by Cybes on Tue Oct 07, 2014 8:58 pm, edited 1 time in total.
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by skippyto » Mon Oct 06, 2014 7:03 pm

Hi Cybes,

I think it's already possible to do something like you describe by generating your iim code in a js script.

Code: Select all

var csvLine = 2 ;
var firstColToUse = 5 ;
var secondColToUse = 12 ;
var macroToPlay = "SET !DATASOURCE example.csv\n"
					+ "SET !DATASOURCE_LINE " + csvLine + "\n"
					+ "URL GOTO=http://www.some_input.com/enter_name.html\n"
					+ "TAG POS=1 TYPE=INPUT:TEXT FORM=form1 ATTR=NAME:first_name CONTENT={{!COL" + firstColToUse + "}}\n"
					+ "TAG POS=1 TYPE=INPUT:TEXT FORM=form1 ATTR=NAME:last_name CONTENT={{!COL" + secondColToUse + "}}\n"
iimPlayCode (macroToPlay) ;
But maybe your scripts woulb be less maintainable...

Skippyto
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by Cybes » Mon Oct 06, 2014 11:09 pm

It's far cleaner if we can do it without resorting to workarounds via JS, also the looping features of the iMacros plug-in interface on workings with .iim scripts, otherwise you have no real transparency of what iteration it is up to (which is actually quite relevant when utilising !LOOP value with CSV input files) and you can't set as easily on the fly things such as max values etc. It also requires others (beyond me) to know both iMacros scripting language and JS to then utilise it, where as if they create a parallel to 'SET DATASOURCE_LINE {{!VAR1}}' but just for {{!COLXX}} then we can have full control via the scripting language itself (and it's cleaner to maintain).
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by chivracq » Tue Oct 07, 2014 12:48 am

Cybes wrote:It's far cleaner if we can do it without resorting to workarounds via JS, also the looping features of the iMacros plug-in interface on workings with .iim scripts, otherwise you have no real transparency of what iteration it is up to (which is actually quite relevant when utilising !LOOP value with CSV input files) and you can't set as easily on the fly things such as max values etc. It also requires others (beyond me) to know both iMacros scripting language and JS to then utilise it, where as if they create a parallel to 'SET DATASOURCE_LINE {{!VAR1}}' but just for {{!COLXX}} then we can have full control via the scripting language itself (and it's cleaner to maintain).
I completely agree with you and I've already been complaining as well about the lack of "Variables embedded in Variables" for example for "{{!COL{{!VAR1}}}}" which returns "__Undefined__", but at least you have one Workaround to achieve what you want, even if it's a bit cumbersome, thanks to 'Skippyto''s Script.

You didn't mention anything about your Config Info, but if you are using Firefox, the "iimPlayCode()" will not work as 'iimPlayCode()' is not supported on FF, you have to use 'iimPlay()'...
About 2 Limitations that you mentioned, you can always prompt the User for 'LOOP_MAX', and you can display 'csvLine' in the Green Display Panel.

I did some Testing this afternoon as well, trying to get '{{!COL{{!VAR1}}}}' to work, but nope! All I got was "Undefined" or "{{!COL1}}" as a Literal String. Excerpt of what I tried:
Escaping with "\", using Single/Double Quotes, '#NOVAR#', 1 or 2 Double Curly Opening/Closing Brackets, concatenating and adding all different parts of the Expression with different Variables, using the EVENT Mode, etc, to no avail...

I came up with 3 Workarounds, 2 in pure .iim and 1 in .js, but I didn't think of creating the .iim Part on the fly in a .js Script like 'Skippyto' did in his Workaround...

-1- My .js Workaround was to handle all the Conditional Logic from a main .js Script and to have mini .iim Macros to fetch the Values from the different Columns (1 .iim per Column) in your .CSV and the .js Script would decide which .iim Macro to play.

-2- My first .iim Workaround was to fetch the Data from all (relevant) Columns, store them in Variables and use 'EVAL()' to spit out the Value of the Column you would want to select.

-3- My second .iim Workaround was to repeat the Statements with all (relevant) Columns with {{!COL1}}, {{!COL2}}, etc... and use 'EVAL()' again to spit out a "1" for "POS=1" for the Column you would want to use and a "0" for "POS=0" for all others. Using of course '!ERRORIGNORE' and a short '!TIMEOUT_STEP'.

Well, you now have 4 Workarounds, that's better than nothing!, even if I completely agree that it would be much easier to have a Built-in '!COLx' Variable that could easily be set to '!COLn'.
Last edited by chivracq on Mon Oct 13, 2014 3:36 pm, edited 1 time in total.
- (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...
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by Cybes » Tue Oct 07, 2014 11:38 pm

Thanks for the ideas! I figured there are workarounds and from years of using iMacros Firefox Plug-in i've developed all kinds of techniques to deal with limitations in the iMacros scripting language, as I enjoy working with iMacros (..generally anyhow). Unfortunately some workarounds just become too convoluted / too complex (and too prone to failure) and can become a nightmare to maintain, so I usually avoid these. Even sometimes when dealing with JS related content within EVAL strings you can end up in a sea of double escapes, mixtures of single and double quotation marks, etc.

Storing all columns values in an !EXTRACT array and then pulling values from the array via EVAL could theoretically be used as one approach, as could various other methods. I just can't see any of these methods as being a 'clean' approach. Also for certain files I use there can be >30 columns yet iMacros only supports 10 (pre-defined) variables AFAIK (VAR0->9) (a wall that I sometimes hit in some of my scripts), so I could never store all columns in VARx's in those situations.

EVAL has been a life-line on a good number of occasions for using JS in an integrated fashion but I primarily use it for string / value manipulation and some very basic conditional checks, but it can't build new commands on the fly that can then be used within the script after it (e.g. something along the lines of this idea SET !VAR1 EVAL("var x; x={{!COL1}};var r; r= '{{!COL'+x+'}}';r;")). If it could do that then in theory you could substitute {{!COLn}} with with {{!VAR1}} at least for referencing a specific column.

Your first method is actually the closest thing we have right now to a clean approach and that puts the core dependency on JS functionality Vs iMacros functionality still. Skippyto's approach is another way that is a way to deal with it but is also JS-dependent.

Anyhow i'm hoping someone at iOpus (Tom?) may put this suggestion forward and we can see *something* implemented!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by chivracq » Wed Oct 08, 2014 12:33 am

Yep, you only have 10 Built-in Variables ([!VAR0-!VAR9]), but you can use as many User Defined Variables as you want...: (Yep, there is a Limit mentioned somewhere in the Wiki, maybe stg like 64000...!? (I wasn't vicious enough to test...!))
Store your {{!COLn}} Values in Col01/Col02/Col03/.../Col99 Variables...!

I would personally go for my first .iim Workaround, either using [Col01-Col99] or an Array indeed...
(But you will need one very long 'EVAL()' Statement to put your Conditional Logic into it... (But I do have one with 42 (=6x7) 'if else' Conditions (which should actually become 90 (=9x10), and it works just fine, takes only a few milliseconds...)))
(But it's because I don't know JavaScript and try to avoid it...!)
(So far, I've always managed to find Solutions using pure .iim Macros, and my Macros contain some form of AI and are much more clever than me on Average...! (Sometimes, I don't know anymore what they are doing, but they are always right...!))

Don't know if you know this Thread for Decision Making using pure .iim where I explained a few of my Techniques:
- Decision Making using iMacros/Possible Workarounds
- (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...
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by Cybes » Wed Oct 08, 2014 10:33 am

Yeah I've used up to maybe !COL40 or so at most but those values can only ever be drawn from input files, so they aren't the same as the built in variables that you can set yourself. If iMacros supported up to !VAR40 then it could be more useful to me in such scenarios.

One of the issues by going the COLx route though is that by reading all those values in for every line it is storing and swapping a whole range of values in and out of memory constantly (especially if looping through lines in a CSV) and given that its working through Firefox's plug-in architecture i'm not sure how prone to memory leaks / corruption it may then become. As you also said it may also involve one very long EVAL statement too. The JS only approach remains the cleanest approach here unfortunately.

But none of these approaches even come close to being as 'clean' as iMacros supporting the ability to look up a single value in a single cell within a CSV and only reading that value. If only iMacros supported it!

PS. Another idea I had (that relates to this subject) is it would be good if iMacros could support running JavaScript scripts from IIM scripts in the same way it currently supports running IIM scripts from JavaScript. This way any time you hit an iMacros limitation that can be addressed in JS you could effectively write a JS function to handle it. Maybe something along the lines of SET !VAR2 RUNJS(JSFunction01.js,"{{!VAR1}}") - So you could execute JS, pass it a value and store the return value in a variable.
viking
Posts: 244
Joined: Sun Mar 16, 2008 7:22 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by viking » Thu Oct 09, 2014 10:02 pm

I really would like to have an option to run run Macros in a Tab which is not active.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by chivracq » Mon Oct 13, 2014 3:58 pm

viking wrote:I really would like to have an option to run run Macros in a Tab which is not active.
What I do is open a new Browser Instance (Pale Moon (=Firefox)) for each Macro that needs to run unattended (and they work perfectly in parallel) and I do all my "personal" Browsing in another (main) Window.

The only Drawbacks are:
- Macros launched from the Task Scheduler will "squat" the last Browser Window that had/has the Focus.
- An .iim Macro launched from within another .iim Macro with "URL GOTO" will "squat" the last Browser Window and the exact Tab that had/has the Focus.
- And when running several Macros at the same time, Built-in Variables are supposed to interfere with each others, though I've never experienced/noticed/tested the Problem...
- (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...
User avatar
garyst1981
Posts: 125
Joined: Tue Jan 15, 2013 1:01 am
Location: Philadelphia, PA
Contact:

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by garyst1981 » Wed Oct 15, 2014 1:09 pm

garyst1981 wrote:Im now having UTF-8 issues also but not just with CSV. In my following config

windows 7 64 bits
imacros beta 8.8.4
firefox 32.0.1

Clear issue was fixed but new problems were introduced

little video
http://www.screencast.com/users/garyst1 ... eb0269c938

it flickers and stays @ that step forever
Still replicating in beta 8.8.5. Same OS and Browser versions

Any news on this one ^
www.gustavorivera.com.mx
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by skippyto » Wed Oct 15, 2014 2:20 pm

Hi
Hi,

I experiment some issues to follow some link with both 8.8.4 and 8.8.5 addons with both Firefox 31 and Firefox 32 on Win XP and Win 7 64 systems.

Here are some examples :

[...]
Just for adding Firefox 33 in the list.

Skippyto.
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by Cybes » Wed Oct 15, 2014 3:23 pm

garyst1981 wrote:
garyst1981 wrote:Im now having UTF-8 issues also but not just with CSV. In my following config

windows 7 64 bits
imacros beta 8.8.4
firefox 32.0.1

Clear issue was fixed but new problems were introduced

little video
http://www.screencast.com/users/garyst1 ... eb0269c938

it flickers and stays @ that step forever
Still replicating in beta 8.8.5. Same OS and Browser versions

Any news on this one ^
Really keen for a new (and comparably much more stable) build. Handing over a whole suite of iMacros scripts to some others in the next week and i'd like their first experience with iMacros to be a positive one and it'll be much more likely if I can get a proper build with the ANSI/UTF-8 encoding issues addressed (as 8.8.4/5 theoretically offer).
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by chivracq » Wed Oct 15, 2014 5:33 pm

The most stable Version of iMacros for FF at this moment is v8.8.2 (on FF30 or Pale Moon v24.x, I haven't tried on PM25 yet...)...
- (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...
User avatar
garyst1981
Posts: 125
Joined: Tue Jan 15, 2013 1:01 am
Location: Philadelphia, PA
Contact:

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by garyst1981 » Wed Oct 15, 2014 8:16 pm

Yeap I wish I didn't upgraded to FF32 Now I would need to upgrade to FF31 and from 8.8.5 to 8.8.2

what a hazzle
www.gustavorivera.com.mx
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Feature Requests & Bug Fix Requests. ADD YOURS!

Post by chivracq » Thu Oct 16, 2014 1:22 am

garyst1981 wrote:Yeap I wish I didn't upgraded to FF32 Now I would need to upgrade to FF31 and from 8.8.5 to 8.8.2

what a hazzle
"...Now I would need to upgrade to FF31..."=> No, not to FF31 but FF30, as FF31 broke iMacros for FF v8.8.2... (for .js Scripts)

But a very stable Config is installing Pale Moon (next to Firefox and you can easily import your whole FF Profile) v24.x (I haven't tested PM v25.0 yet..., iMacros v8.8.3+ Beta broke PM v24.x), together with iMacros for FF v8.8.2... (It's my Config..., very stable, 30% quicker than pure FF, no Memory Leaks...)
- (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