473,416 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

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

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
4 4814
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Benson | last post by:
Yes, but I was referring to VBScript apart from the runtime children like Dictionary, Network etc., like the C language apart from the Standard Library. I agree, though, Dictionaries are cool,...
20
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client...
37
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our...
4
by: korund | last post by:
Is there any difference to read & write to windows Registry with VBScript or JavaScript? Both scripting languages have similar syntax. What is preferable use for this? thanks.
4
by: Joe Hrbek | last post by:
Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. var dataListener = { data : "", onStartRequest: function(request,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.