JRS: In article <3f********@olaf.komtel.net>, seen in
news:comp.lang.javascript, Martin Honnen <ma*******@yahoo.de> posted at
Sun, 21 Dec 2003 19:41:43 :-
Dr John Stockton wrote:
The following DOS prompt command line, in a Win98 DOS box,
cscript //nologo ~tmp.js
executes file ~tmp.js as javascript/Jscript.
You do not even need the command line, double clicking the file should
run it with wscript.
Not when working at a DOS prompt. I had in mind including that in a DOS
batch file, as I showed below.
And of course Windows Script Host for some years now also has some XML
format for .wsf files which allow you to include different library files
etc.
Such scripts are presumably on-topic here.
I don't mind anyone asking questions about JScript programs for Windows
Script Host here but I think that groups like
microsoft.public.scripting.wsh
provide more expertise on Windows Script host. Admittedly WSH groups
postings are more often dealing with VBScript programming than JScript
programming but the object model is the same. And there are jscript
scripting groups on the Microsoft server that deal with Windows Script
Host programming too.
AFAICS, they in practice refer at least predominantly and AFAIR almost
wholly to VBscript (when using WSH) or to use in Web pages.
(a) ISTM worth mentioning this in the FAQ, as it opens a door that might
not previously have been noticed and which has much on the other side.
Windows Script Host is mentioned in the FAQ as one of the common hosts.
The HTML version of the FAQ is even created by a .wsf file.
Mentioned rather in passing, though, and unlikely to be noticed by the
unaware.
(c) Are any good references known, dealing with the above and not too
much else?
Well, the MS scripting documentation documents the Windows Script Host
object model, file format etc:
http://msdn.microsoft.com/library/de...ist/webdev.asp
MS references are rarely good for those with an intermittent Net
connection. They have rather few information bits per byte transferred.
I believe that an entry in Section 4 of the FAQ would be worthwhile;
just illustrating starting javascript-in-WSH from the command line and
from, say, File Manager & Internet Explorer, and giving a well-chosen
link or two.
It could include
<script type="text/javascript" src="include1.js"></script>
&
<script type="text/javascript">
...
</script><noscript> ... </noscript>
- they may be strictly HTML, but they are important to Web use of
javascript, and often given wrongly in the group.
Perhaps a possible <FAQENTRY> could be composed here, if Jim would like
to use such.
The FAQ has not been updated lately, and new expertise has come into the
group. Might it be worth jointly reviewing one numbered part here each
week, starting I suggest at 3.1 and working round to 2.12 then 3.1
again?
Re 3.1 - I find the Pocket Reference Flanagan very useful; it is cheaper
& smaller.
Re 3.2 - Nothing to say about the intent, but I'd prefer <p> instead of
<BR> before each subsubsection.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.