My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
jswinhost  
jswinhost executable
doc
Updated Mar 28, 2011 by sou...@gmail.com

jswinhost executable

home > JSLibs > jswinhost -

Description

jswinhost (javascript windows host) is a small executable file that run javascript programs under a windows environment. The main difference with jshost is the jswinhost does not create any console windows.

Methods

  • status LoadModule( moduleFileName )
  • see jshost

Properties

  • Object global
  • is the global object.
  • Array arguments
  • is the host path 0 and whole command line 1.
  • boolean isfirstinstance
  • is true ic the current instance is the first one. This can help to avoid jswinhost to be run twice at the same time.

Configuration object

see jshost

Remarks

There is no way to specify the script to execute using the command line. You have to create a .js file using the name of the host. By default, jswinhost.exe is the name of the host and jswinhost.js is the script the host execute.

Because jwinshost do not use a console window, errors and printed messages will not be displayed.

However, you can write your own output system:

LoadModule('jswinshell');
_configuration.stdout = new Console().Write;
_configuration.stderr = MessageBox;
LoadModule('jsstd');
Print('toto');
hkqjsfhkqsdu_error();

Embedding JS scripts in your jswinhost binary

see jshost
Comment by dusel...@hotmail.ru, Sep 29, 2009

BTW: Some typos(?) in jswinhost/jshost API doc (see also jsstd): 1) ... is true ic(f) the current ... 2) ... (underscore)configuration.stdout = new Console().Write; (underscore)configuration.stderr = MessageBox?; ... P.S. Submit eliminates real underscores from the form (?)

Comment by project member sou...@gmail.com, Sep 29, 2009

Done (in SVN).


Sign in to add a comment
Powered by Google Project Hosting