How to receive events from a COM automation server
How in the name of ...
from
Stardock Forums
Heya people,
hope ur all doing just GREAT !!
It's been a while since I've shown any form of activity on the forums... been fair busy learning all sorts of things with DesktopX...
I also intend to post some objects based on concepts which I've discussed in the past within the next few weeks... so stick around... 'cause u may find some things u'll enjoy!!
Anyway... Please could somebody help me get this right...
How does one register a callback with a COM Server??
Eg:
Set fb2k = WScript.CreateObject("Foobar2000.Application.0.7")
Set playback = fb2k.Playback
ConnectObject playback, "playback_"
Sub playback_TrackChanged()
MsgBox "Track changed"
End Sub
This script works with the WSH but DesktopX obviously doesn't support ConnectObject...
BTW: I'm not using WScript.CreateObject in DesktopX... I am using only CreateObject... so that's not the problem
As stated by others... the ConnectObject statement returns a 'Type mismatched' error!!
Is it possible to use WithEvents in DesktopX??
If so... How?
PLEASE can somebody who knows how to do this show us how it's done... or let us know if it's even possible!!
Best wishes to everyone...
hope ur all doing just GREAT !!
It's been a while since I've shown any form of activity on the forums... been fair busy learning all sorts of things with DesktopX...
I also intend to post some objects based on concepts which I've discussed in the past within the next few weeks... so stick around... 'cause u may find some things u'll enjoy!!
Anyway... Please could somebody help me get this right...
How does one register a callback with a COM Server??
Eg:
Set fb2k = WScript.CreateObject("Foobar2000.Application.0.7")
Set playback = fb2k.Playback
ConnectObject playback, "playback_"
Sub playback_TrackChanged()
MsgBox "Track changed"
End Sub
This script works with the WSH but DesktopX obviously doesn't support ConnectObject...
BTW: I'm not using WScript.CreateObject in DesktopX... I am using only CreateObject... so that's not the problem
As stated by others... the ConnectObject statement returns a 'Type mismatched' error!!
Is it possible to use WithEvents in DesktopX??
If so... How?
PLEASE can somebody who knows how to do this show us how it's done... or let us know if it's even possible!!
Best wishes to everyone...





