Greetings All !
I've got a section of a script that's giving me a bit of trouble:
hspiWMP.Play "Media Library", "category", "hallelujah3"
hs.WriteLog "DEBUG", "hspiWMP.MEDIAIsPlaying = " & hspiWMP.MEDIAIsPlaying
do while hspiWMP.MEDIAIsPlaying
hs.WaitEvents
loop
When I execute this, I get an error on the second line above, where "hspiWMP.MEDIAIsPlaying" gets called. I get an "object does not support this property or method" error.
I had based that code on some similar code I found here in the forums.
Basically, I've been trying to write a sort of generic script where, if I pass it a sound file path & name, plus a value for volume, it will locate and play it. However, I couldn't get that to work until I added the sound file to Windows Media Player's master list... and then switched to using the "hspiWMP.Play" command line above. (And, as you can see, for the moment, I've hard-coded the name of the file we are to play.)
So, can anybody tell me what I'm doing wrong with that call the MEDIAIsPlaying? (And, if anybody's figured out how to pass Homeseer Media Player a file-path and get it to play, I'd greatly appreciate some advice on that.)
Thanks!
-= Dave =-
I've got a section of a script that's giving me a bit of trouble:
hspiWMP.Play "Media Library", "category", "hallelujah3"
hs.WriteLog "DEBUG", "hspiWMP.MEDIAIsPlaying = " & hspiWMP.MEDIAIsPlaying
do while hspiWMP.MEDIAIsPlaying
hs.WaitEvents
loop
When I execute this, I get an error on the second line above, where "hspiWMP.MEDIAIsPlaying" gets called. I get an "object does not support this property or method" error.
I had based that code on some similar code I found here in the forums.
Basically, I've been trying to write a sort of generic script where, if I pass it a sound file path & name, plus a value for volume, it will locate and play it. However, I couldn't get that to work until I added the sound file to Windows Media Player's master list... and then switched to using the "hspiWMP.Play" command line above. (And, as you can see, for the moment, I've hard-coded the name of the file we are to play.)
So, can anybody tell me what I'm doing wrong with that call the MEDIAIsPlaying? (And, if anybody's figured out how to pass Homeseer Media Player a file-path and get it to play, I'd greatly appreciate some advice on that.)
Thanks!
-= Dave =-
Comment