473,396 Members | 1,998 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,396 software developers and data experts.

Is there an equivalent to CreateObject in JavaScript?

I want to do some Win32 application automation from JavaScript. Is it
possible? Failing that, is there a way to execute an application from
JavaScript?

Paul
Jul 23 '05 #1
2 19203
VK
Not with JavaScript, but with JScript (means it will work for IE only
and possibly for the latest NN8)

Use ActiveXObject for that. More reading and samples:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsobjactivexobject.asp>

Sure a bunch of security limitations - read through.

Jul 23 '05 #2


Paul Hanchett wrote:
I want to do some Win32 application automation from JavaScript. Is it
possible? Failing that, is there a way to execute an application from
JavaScript?


You can write Windows Script Host scripts in any active scripting
language, Windows comes with VBScript and JScript (MS version of
JavaScript) so to automate an application you simply use
var application = WScript.CreateObject('program.id')

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
2
by: Gary McGill | last post by:
In (traditional) VB, it's possible to instantiate a COM object using something like Set obj = CreateObject("MyDll.MyObject), and then call that object's methods (either using late binding, or using...
1
by: ricolee99 | last post by:
Hi There, I'm trying to convert some VB code into C#. There is a function defined in VB, GetAbsolutePathName(path) where it returns the complete path from the root of the drive for the...
2
by: Ron | last post by:
Hello, I have to invoke instances of MS Excel and MS Access from my vb.net applications so that I can invoke procedures that reside in the Excel and Access applications from the vb.net...
0
by: Rob Blackmore | last post by:
Hi, A simple question I'm sure, but can someone point me in the right direction of how to have the equivalent of 2 projects in VB.Net, 1 that is a standard EXE and 1 that is an ActiveX.EXE that...
4
by: Andrew Hilton | last post by:
When you create an object in classic asp code, should you always use Server.CreateObject("ProgID")? Are there implications with stability (ie memory leaks) if you create COM objects in other ways...
9
by: Terry | last post by:
Based on the documentation that I have found on this subject, I am trying to use ‘Activator.CreateInstance(string, string)’ for a replacement for CreateObject, but I don’t seem to be able to...
4
by: Fresh_Air_Rider | last post by:
Hi In the "good old" Classic ASP days, I used to stream records from a SQL Server database out to the user's browser in CSV format by using a combination of COALESCE and the ADODB.Stream object....
4
by: John | last post by:
Hi What is the System.Net.HttpWebRequest equivalent code for the MS XML related code below? Thanks Regards
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.