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'/'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...