bcrider wrote: ↑Fri Apr 23, 2021 11:53 am
Thank you so much for your help!
Even though you don't typically work with that Syntax you were able to give me the answer I needed.
Code: Select all
SET !VAR2 EVAL("var s='{{!COL10}}'; if(s == 'Voxter-Voice-Carrier-Termination (System)') 1; else 0;")
Solved the issue, looks like I didn't need the .string but I did need a second '=' sign which I wasn't aware I needed.
Ah...!, alright, good to hear... And yep indeed, I didn't know this 'string' Property that you used, but I don't know "everything" about JS, ah-ah...!, and I didn't bother to check the Documentation..., and iMacros anyway treats all Vars as Strings already inside 'EVAL()', even Arrays... It makes a "vague" Attempt to recognize Numbers, but it often fails and is not very reliable, => Number Vars need to be x1 to make sure they "become" Numbers...
The Implementation I gave you in '!VAR4' would be the "Best Practice" btw, by declaring your long "Compare String" outside the 'EVAL()' Statement as it will shorten the 'EVAL()' and it's easier to modify an "external" Var if needed and that makes your Script more configurable... Same if you need to copy/repeat that Line/Block for a similar Functionality somewhere else in your (or in another) Script, the 'EVAL()' Statement is then more generic and easier to reuse...
- (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...