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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening windows media player 1

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
Hi,
I have a directory of ".avi" files and I'm trying to have Windows Media Player open when I click on the button, but it's not working. Any suggestions, I can open up .txt files w/no problem. Thanks in advance
Code:
on mouseUp me
  strMovie = strName & ".avi"
  put strMovie
  open strMovie with "Windows Media Player"

 
Director "open" command requires full path to the application. For example:
--
open strMovie with "C:\Program Files\Windows Media Player\wmplyer.exe"
--
The problem is that not everyone has WM player in the directory you specify, so unless you're developing for a specific environment I would use BuddyAPI "baOpenFile" command as it won't require the application path.
--
baOpenFile(the moviePath & strMovie, "Normal")
--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top