I've made a help file with "HTML Help Workshop 4.74"
What I'd like to do is put a link so that when the user clicks on it,
windows media player opens up (not inside the CHM file, but using it's
regular interface) and automatically starts playing an MP3 file in a fixed
file location.
This will never be viewed in a web browser, it will always be a CHM file.
Someone from this group gave me a link, but that link was on embedding the
player inside the CHM file. This I don't want.
Thanks for your time and for any info you can provide.
http://helpware.net/FAR/far_faq.htm#Applets
(scroll down a bit to the GetChmDir() function)
Rob
"Boopipi" <NotAvailable@Reply_In_Newsgroup.com> wrote in message
news:%23SG6VV3...@TK2MSFTNGP04.phx.gbl...
Thanks for your response,
Actually the MP3 will always be in the same directory as the CHM (don't need
to obtain the path). I just need to call up Windows Media Player (not
within the CHM but in its regular window) and have it play the MP3
automatically.
The "getchmdir()" that you pointed out seems to search for and return the
path.
I tried putting the following directly in the HTML. It didn't work:
<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
TYPE="application/x-oleobject">
<PARAM NAME="fileName" VALUE="teaching.mp3">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT>
================================
"Rob Chandler [MVP]" <sup...@nospam.helpware.net> wrote in message
news:uRiES5%23zKH...@TK2MSFTNGP05.phx.gbl...
Off the top of my head you need to try something like this...
var path = GetCurrDir(); //See script in download link above
if (path != '')
path = path + '\\';
alert(path); //debug
document.writeln('<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
TYPE="application/x-oleobject">');
document.writeln('<PARAM NAME="fileName" VALUE="'+path+'teaching.mp3">');
document.writeln('<PARAM NAME="autoStart" VALUE="true">');
document.writeln('<PARAM NAME="showControls" VALUE="true">');
document.writeln('</OBJECT>');
I often run external media but I let mine open in the desktop player...
var path = GetCurrDir(); //See script in download link above
if (path != '')
path = path + '\\';
alert(path);
document.writeln('<a href="'+path+'teaching.mp3">Click me</a>');
Rob
"Boopipi" <NotAvailable@Reply_In_Newsgroup.com> wrote in message
news:e%23TffuC0...@TK2MSFTNGP05.phx.gbl...
Why do you need to have GetChmDir() get the path ? Couldn't one just insert
a path when you dynamically create the media player ? The location of the
CHM and the MP3s are fixed; these paths will not change.
The CHM will have roughly 20 pages. Each page describes an MP3 file of a
sunday service, and gives the user the option of hearing the MP3 in a
separate media player window.
By the way, will this work in XP, 98, Vista ?
Thanks for your help. Much appreciated.
Peter
===================================
"Rob Chandler [MVP]" <sup...@nospam.helpware.net> wrote in message
news:eBhIKaK0...@TK2MSFTNGP02.phx.gbl...
The only reliable way we have found is to dynamically
create an absolute path and code at run time.
If you find a better way let us know :-)
XP and Vista good. Win98 (IE4 and HH 1.1)
is very old. If you have problems you may need
to ask users to upgrade to Win98 SE (IE5 and HH 1.21)
or maybe just install a later version of IE which should
also include a later version of HH runtime.
Rob
"Boopipi" <NotAvailable@Reply_In_Newsgroup.com> wrote in message
news:uu5n$Fg0KH...@TK2MSFTNGP02.phx.gbl...
Thanks
==================
"Rob Chandler [MVP]" <sup...@nospam.helpware.net> wrote in message
news:Ovc0Czn...@TK2MSFTNGP04.phx.gbl...