Code: Select all
0</*! ::
@echo off
set "c=0.618"
cscript //nologo //e:javascript "%~f0" %* add("%c%")
pause
goto :EOF
*/0;
function add(c){
return c;
}
WScript.Echo(eval(WScript.Arguments(0)));
But when "c" is something like this: "c="jhfd":{"mhhdu":[{"trhjs:"vfdf://rfhg.hdfrgg.yuyyt/d/t/klhjkjk/78.1/8ree/86.vfd"}]," it returns an error...
Question: how could i pass correctly such a variable from batch section to javascript one, or how can i open a local file in javascript section and store it to variable? Or maybe there're another ways, without using a function, for example, to get similar result? Thanks to all.