Using Variables in Freeware-Version not possible?!

Discussions and Tech Support specific to the iMacros for Chrome extension.
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
Torsten156
Posts: 15
Joined: Wed Jul 08, 2020 6:18 am

Using Variables in Freeware-Version not possible?!

Post by Torsten156 » Wed Nov 25, 2020 8:51 am

Hi,

i use iMacro (Freelicense) and now i would like to use/set two variables:

Code: Select all

SET !MYDATE {{Date()}}
SET !NEWDATE {{!MYDATE.getMonth()-1}}
I get this Information:
FreewareLimit: Freeware version limit exceeded: user defined variables not allowed. Maximum number of variables is 3
But, i use 2 variables! What is the problem here?

Regards
Torsten


My Config:
iMacros - 10.1.0
Chrome - 86.0.4240.198
OS - WIN 10 Enterprise
chivracq
Posts: 9721
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Using Variables in Freeware-Version not possible?!

Post by chivracq » Wed Nov 25, 2020 10:28 am

Torsten156 wrote:
Wed Nov 25, 2020 8:51 am
Hi,

i use iMacro (Freelicense) and now i would like to use/set two variables:

Code: Select all

SET !MYDATE {{Date()}}
SET !NEWDATE {{!MYDATE.getMonth()-1}}
I get this Information:
FreewareLimit: Freeware version limit exceeded: user defined variables not allowed. Maximum number of variables is 3
But, i use 2 variables! What is the problem here?

Regards
Torsten


My Config:

Code: Select all

iMacros - 10.1.0
Chrome - 86.0.4240.198
OS - WIN 10 Enterprise

Yep indeed, "normal" Behaviour in all 'Free' Versions for FF/CR/IE, => you can only use the 3x '!VAR1' <=> '!VAR3' Built-in Vars and you cannot use your "own" User-Defined Vars (anymore)... (which I find a "useless" Limitation, forcing Users to rename their Vars to '!VAR[1-3]', and you cannot squeeze that many Vars anyway in 50 Lines of Code (another Limitation for the 'Free' Versions)...)

Calling your own Vars "!MYDATE" and "!WHATEVER" is not a "Best Practice" btw, you "should" keep the '!' + All-Caps for Built-in Vars, "better" Names (that help for Readability of your Scripts) would be for example "MyDate" or "My_Date" + "NewDate" or "New_Date"... Simply adopt one Convention for yourself, and stick to it in all your Scripts...

The Syntax you are trying to use (with "Date()" and "getMonth()") also looks very strange to me, I don't think it will work "directly", those look like JS Methods to me, that will only work inside 'EVAL()', I would think... :?

And if you need more than 3 Vars in your Script, you can also use/misuse the '!EXTRACT' Var, which can actually contain several Sub-Vars itself with the "ADD !EXTRACT" Command/Mechanism, to later re-separate the Sub-Values on the '[EXTRACT]' Separator using 'EVAL()' + 'split()', but you'll need to "keep" one of the '!VAR[1-3]' Vars "free" to do that... Or using the '!CLIPBOARD' Var is also a possibility...

I personally find this Limitation about Vars in the 'Free' Versions a bit "pointless" and only nagging Users and forcing them to write "obscure" Scripts, and it is actually possible to still declare and use as many (Sub-)Vars as you want using only 2 Vars, like the Mechanism I mentioned with '!EXTRACT' and also in this Thread/Post...
(I didn't post the "Full Implementation" in that referred Thread as I stopped helping in that Thread because I didn't "like" how that User was "using" our Forum + SOF and deleting their Threads, but I'm still "considering" to finish that one Thread with a "Full Implementation", or I/we could post it in "your" Thread if you need the Functionality...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply