Re: How to capture WMP events with script (and not HTML)?

Tech-Archive recommends: Fix windows errors by optimizing your registry



SorceryKid the goth-boi wrote:

> I find it unbelievable that Microsoft itself does not
> keep its own standards straight. They design other
> well-known ActiveX controls (like he one I showed above
> as well as others) that do expose specific properties for
> reassignment with scriptable event handlers. So the MSDN
> site, is not correct in asserting that script authors
> must use SCRIPT FOR..EVENT tags.

You don't understand how events work in ActiveX.

The generic and standard way to sink events from an object
requires the object's client to implement an event sink
interface as defined by the object and connect it to the
object instance. This is the general way but there is no way
to do this in script unless the script engine provides
special support for it and neither JScript nor VBScript do.
So, the script host has to provide a connection mechanism
instead: WSH provides the WScript.ConnectObject() method and
IE provides the <SCRIPT FOR EVENT> tag.

Few ActiveX classes meant to be used in scripting and web
pages, like MSHTML and XMLHTTP, add another custom mechanism
to the standard event dispatching mechanism thus they
provide custom single event connections using internal
properties to hold multicast or unicast event handler
references. This is done to make life easier to users of
those classes with scripts embedded in web pages, but it is
a custom way to handle events that do not work with generic
ActiveX controls because those controls only know about the
standard event sinking mechanism.

IE and WMP have no special support for each other so WMP
fires events the standard way and those events must be sunk
in IE the standard way, which means connection points which
are created in IE using the <SCRIPT FOR EVENT> tag.


--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net



.



Relevant Pages

  • Re: Desktop Wallpaper & Group Policy
    ... You could use a script at logon to check for several wallpaper's in the ... You would also need to make sure that the four standard ... strWallpaper = objShell.RegRead ... The script reads the regisrty and checks the keys and uses the sub to reset ...
    (microsoft.public.windows.group_policy)
  • Re: [PATCH] x86: update vmlinux.lds.S to place .data section on a page boundary
    ... and this prevents kexec from loading a new kernel. ... NAK ... its the standard of the script. ...
    (Linux-Kernel)
  • Re: document.write and problems with how it overwrites existing code
    ... > Your definition of 'modify' seems to exclude completely replace. ... > me in both those browsers. ... Javascript/JScript/ECMAscript war of script specifications. ... when they won't operate with the common (dare we say standard?) code. ...
    (comp.lang.javascript)
  • Re: Dell M5200N Laser Printer and SCO Openserver 5.0.x
    ... > | The printer interface script we are using, ... > standard HP script can be of any use. ... using port 9000 to make changes to any of the internal settings of the ... the telnet prompt given when you log in...) ...
    (comp.unix.sco.misc)
  • Re: Dell M5200N Laser Printer and SCO Openserver 5.0.x
    ... |> | The printer interface script we are using, ... |> standard HP script can be of any use. ... | using port 9000 to make changes to any of the internal settings of the ... | the telnet prompt given when you log in...) ...
    (comp.unix.sco.misc)