473,762 Members | 7,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can javascript call a MS Windows COM object?

Hello

Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?

Angus
Jan 30 '06 #1
3 6286
Angus Comber wrote:
Hello

Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?

Angus


No different that VBScript, JScript can automate any COM object with
IDispatch interface. Search for Windows Scripting Host (or WSH).

However, this is subject to security rules when JavaScript is hosted in
Internet Explorer.

JavaScript (as defined in ECMA specification) cannot automate COM object.
Jan 31 '06 #2
Roman wrote:
Angus Comber wrote:
Can javascript call/reference COM object. VBScript can do this (as it is
from Microsoft). Can javascript? If so how?
[...]
No different that VBScript, JScript can automate any COM object with
IDispatch interface. Search for Windows Scripting Host (or WSH).


The Windows Script Host (formerly: Windows Scripting Host) does not have
much to do with this. Use of ActiveX/COM is not restricted to that; one
could say, unfortunately, considering the number of security leaks and
therefore, security patches for Windows systems and Internet Explorer
required because of this during the years.
However, this is subject to security rules when JavaScript is hosted in
Internet Explorer.
True.
JavaScript (as defined in ECMA specification) cannot automate COM object.


That is not quite correct. What is important in answering this question
properly is: Does the UA's AOM/DOM expose means to access ActiveX/DOM
objects, and if yes, which?

Therefore, it is incorrect to say that JavaScript cannot automate COM
objects. Netscape (all versions) on Windows can automate the ActiveX/COM
object of the Windows Media Player, and with the ActiveX Plugin installed,
all Mozilla browsers (NN4+, Gecko-based browsers) can automate probably all
ActiveX/COM objects. Of course, the scripting language they support do to
so is (Netscape) JavaScript.

BTW: Please learn to quote.
PointedEars
Jan 31 '06 #3
Roman wrote:
JavaScript (as defined in ECMA specification) cannot automate COM object.


I forgot to mention that both JavaScript 1.1 and 1.3+. and JScript are fully
compliant ECMAScript implementations , and JavaScript is not "defined in
ECMA specification".
PointedEars
Feb 1 '06 #4

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

Similar topics

0
9377
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.