By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,100 Members | 2,892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,100 IT Pros & Developers. It's quick & easy.

Python vs. VBScript vs. JavaScript in context of Windows ScriptingHost?

P: n/a
Hi, I'm in a tightly-secured environment where I may not be allowed to use
Python for some scripting work, and may have to fall back on what came with
Windows 2K.

I'm cracking "VBScript in a Nutshell" from O'Reilly, and have found a number
of disappointments:

* can't find "Introspection" in the Index
* no record types, just numerically-indexed arrays, so record handling is
kludgy
* zero-based array indexing (this is Basic?)
* script debugger is slanted towards debugging VBScript inside Internet
Explorer
* "on error resume next" pretty much sums up the error handling
* truly bizarre use of parentheses to override argument passing by reference
in a completely nonobvious context

It looks pretty weak compared to Python, but I may not have the luxury of
Python in this situation.

Here's the question: If JavaScript is available to me within the Windows
Scripting Host, can it do everything that VBScript can? My JavaScript
documentation (the O'Reilly rhino book) is "client-side scripting"-centric,
and as such accepts the limitations on file manipulation imposed by the
client-side security scruples. Can anyone recommend a reference on
JavaScript as an expedient replacement for Python within the context of the
Windows Scripting Host?

I know this isn't the real concern of this forum, but I know there are a lot
of experienced generalists out there whose experience I would like to tap.
Thanks in advance for any responses.

Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
John Benson wrote:
Here's the question: If JavaScript is available to me within the
Windows Scripting Host, can it do everything that VBScript can?
Yes, Andy's reply is right on target. JavaScript can access all of the same
WSH object model as VBScript. I think you'll find JavaScript to be a much
more satisfactory language than VBScript.
My JavaScript documentation (the O'Reilly rhino book) is
"client-side scripting"-centric, and as such accepts the
limitations on file manipulation imposed by the client-side
security scruples. Can anyone recommend a reference on
JavaScript as an expedient replacement for Python within
the context of the Windows Scripting Host?


Flanagan's book (the rhino book) will still be useful. All of Parts I and
III (Core JavaScript and Core JavaScript Reference) apply to JavaScript in
any environment: browser, WSH, Adobe Acrobat or Photoshop, you name it.

Microsoft has a very good Windows Script site with information on Script,
the WASH object model, etc. here:

http://www.msdn.microsoft.com/scripting

That plus Flanagan's book should be just about everything you need.

-Mike
Jul 18 '05 #2

P: n/a
Michael Geary wrote:
Microsoft has a very good Windows Script site with information on Script,
the WASH object model, etc. here:

http://www.msdn.microsoft.com/scripting


That, of course, should say "WSH object model." Dang spelling checker went
and changed it before I noticed! :-)

-Mike
Jul 18 '05 #3

P: n/a
On Sat, 15 May 2004 12:01:28 -0700, "John Benson"
<js******@bensonsystems.com> declaimed the following in
comp.lang.python:
* zero-based array indexing (this is Basic?)
BASIC has ALWAYS had zero-based indexing... BUT it played a game
with the users...

dim a(10)

allocates ELEVEN elements, indexed 0..10, and most people never realized
the 0 index was available.
-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #4

P: n/a
In article <ma************************************@python.org >,
John Benson <js******@bensonsystems.com> wrote:
Hi, I'm in a tightly-secured environment where I may not be allowed to use
Python for some scripting work, and may have to fall back on what came with
Windows 2K.

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.