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