.js -> EXE

From: Michael Stum (devnull_at_stum.de)
Date: 06/20/04

  • Next message: Juergen Schwarze: "Re: .js -> EXE"
    Date: Sun, 20 Jun 2004 19:41:37 +0200
    
    

    Hallo,

    ich habe eine .js Datei, also ein JScript. Dieses soll immer mit cscript,
    nicht aber mit wscript ausgeführt werden (Ausgabe auf die Kommandozeile ist
    wichtig).
    Daher meine Frage: Kann man ein .js irgendwie zu einer Kommandozeilen-EXE
    kompilieren?

    Oder: Kann ich das Script dazu bringen, ggf. eine "DOS Box" aufzumachen und
    darauf auszugeben? WScript.Echo öffnet leider immer ein Fenster wenn es mit
    WScript statt cscript gestartet wird... :-(


  • Next message: Juergen Schwarze: "Re: .js -> EXE"

    Relevant Pages

    • Re: Running a script using VB6 ScriptControl
      ... write some code to implememt the members of wscript ... All works well except that I need the script to "sleep" for a few seconds. ... Private Declare Sub apiSleep Lib "kernel32" Alias "Sleep" ... Public Property Let Parent ...
      (microsoft.public.scripting.vbscript)
    • Re: Running a script using VB6 ScriptControl
      ... > If you want to use WScript -- WRITE IT YOURSELF!!! ... > home-brew wscript object available to your script. ... > Public Property Let Parent ... > Public Sub Echo ...
      (microsoft.public.scripting.vbscript)
    • Re: Can using Wscript.StdOut.Write ?
      ... that refers to consoles by design, WScript doesn't support them. ... So if you launch your script by 'wscript bar.vbs' it won't work, ... An alias for the WScript-object is btw 'WSH' ...
      (microsoft.public.scripting.wsh)
    • Re: Can using Wscript.StdOut.Write ?
      ... 'WScript.StdOut.WriteLine' will raise an error 'invalid file handle' ... that refers to consoles by design, WScript doesn't support them. ... So if you launch your script by 'wscript bar.vbs' it won't work, ... Any example for using cscript can allow arguments input? ...
      (microsoft.public.scripting.wsh)
    • Default Script Host
      ... My default Script Host magically changed from CScript to WScript. ...
      (microsoft.public.scripting.vbscript)