BlueOne wrote:Hi chivracq,
I update my post because your first solution was correct.
I was too tired when i write my previous post...
Well, I'm not sure about my "first solution was correct", because I used Backslashes en even after your EDIT, you left a Forward Slash, so do you have to use Forward or Backward Slashes to escape Double Quotes...!?
Maybe easier if you post yourself your Working Solution...
And you still don't react about Single Quotes either for the inner or for the outer Double Quotes...
BlueOne wrote:By the way i have a similar problem with a EVAL line maybe you could see what's the problem.
I want to transform this imacros code in javascript: (it's work)
Code: Select all
SET !VAR1 EVAL("var a=\"{{!EXTRACT}}\";a.replace(\" \",\"\");")
After few tries i write this javascript adaptation but still it's doesn't work... any idea ?
Code: Select all
extract +="SET !VAR1 EVAL(\"var a='{{!EXTRACT}}';a.replace(( ),())\")"+ "\n";
I'm sure is the same kind of problem...
Thanks
For this one, this is very cumbersome, 'EVAL()' is a way to use JavaScript in pure .iim Scripts, you are already in a JavaScript "Environment" because you are creating an .iim Script on the fly in a .js Script (which I already find cumbersome, some "clever" Kid created such a Script years ago and posted it on some obscure Forum to impress other Script Kiddies and that Script has since gone Viral while hardly anybody understands how it works and they all come to the Forum with a Pb though I don't even use (and never have) those stupid

Scripts), so you are now embedding JavaScript in an .iim Script embedded in JavaScript.
So either you use pure .iim Scripts like I do, if you need some Conditional Behaviour, well then OK..., it's OK to use a .js Script (even if I still stick to pure .iim and I do more complex things in pure .iim than I've ever seen in .js Scripts on the Forum...), but then you put the .iim part in an .iim Macro that you call with 'iimPlay()', especially if you still want to use some JavaScript in that .iim. Or you do the JavaScript part directly in your .js Script. Embed x3 is cruising for Trouble=Spanking...!
But for your thing, pfff, dunno, try stg like this:
Code: Select all
extract +='SET !VAR1 EVAL("var a='{{!EXTRACT}}'; a.replace(' ','');")' + "\n";
or:
Code: Select all
extract +="SET !VAR1 EVAL(\"var a=\\\"{{!EXTRACT}}\\\"; a.replace(\\\" \\\",\\\"\\\");\")"+ "\n";
And you may need to use Forward Slashes instead of Backslashes on MacOS, it's still not clear to me..., see my Comment to the first Quote...
- (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...