No I understand. Your script needs to get the CHM dir using
that GetChmDir() call then you need to dynamically create
that media player code using the path.
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
Post by BoopipiHello,
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.
<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>
================================
Post by Rob Chandler [MVP]So you need to write some script that finds the
location of the Video file. Usually the Video
file is near the CHM so you just find the CHM
path, and add the video filename.
http://helpware.net/FAR/far_faq.htm#Applets
(scroll down a bit to the GetChmDir() function)
Rob
Post by BoopipiHello everyone,
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.