Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding MediaPlayer in vbscript, not html

Status
Not open for further replies.

altoh

MIS
Nov 26, 2003
2
SG
Hi,

I would like to know how do I embed Mediaplayer within VBscript so that a particular audio runs on clicking the script file? This is a stand alone script which I am not using it in any html scripts.

Would really appreciate some help here.

Thanks a lot!
 
You can try something like this:
Code:
Audio="""\path\to\audio file.mp3"""
Set Sh=CreateObject("WScript.Shell")
Set X=Sh.Exec("%COMSPEC% /C Start /min /wait " & Audio)
' Your stuff here
X.Terminate
WScript.Quit

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top