Marco Gaiarin schrieb:
> Mandi! Tomasz Chmielewski
>   In chel di` si favelave...
> 
>>> Speaking practically: i can wrap around 'Script file path' a batch
>>> file?
>> No, it has to be something "startable" by cscript.
> 
> Ok, i've fired up the feature request. Please consider it.
> 
> 
> As a total .js ignorant: could keep this approach, eg, build a little
> .js script that check an environment variable and then call wpkg.js?

OK, let's practice some JScript - create a file called marco.js, with 
contents:


// some needed stuff
var shell = new ActiveXObject("WScript.Shell");
var your_variable = shell.Environment("PROCESS");

// substitute "YOUR_CMD_VARIABLE" with the variable
// you used in cmd.exe
var simple = your_variable("YOUR_CMD_VARIABLE");

// our check
if (simple == "marco_learns_jscript")
        {
        WScript.Echo("Starting notepad " + simple + "...");
        shell.exec("notepad " + simple);
        } else {
        WScript.Echo("Your variable was: " + simple);
        }



Now, start cmd.exe, declare a variable, and start the code:

set YOUR_CMD_VARIABLE=jscript_is_hard_to_learn
cscript marco.js


Then, change the variable, and start the code again:

set YOUR_CMD_VARIABLE=marco_learns_jscript
cscript marco.js


Now that you're advanced in JScript, you can fixing old bugs :)


-- 
Tomasz Chmielewski
http://wpkg.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wpkg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wpkg-users

Reply via email to