Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Play Media File or PC beep

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,49235
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> Play Media File or PC beep
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Play Media File or PC beep - 7/9/2007 11:44:56 PM   
  Rischip


Posts: 414
Score: 2
Joined: 3/26/2007
Status: offline
This script will play a pc beep, or a media file. Many scripts use sound recorder to play back .wav's. This script will play anything that windows media player can play.
Command line arguments are (in any combination):
pcbeep                 'plays pcbeep
visible                   'makes media player open visible
mediafilename      'the full url to the file to be played


      

_____________________________

Rischip
Author of - The Grim Linker
 
 
Post #: 1
 
 RE: Play Media File or PC beep - 8/6/2007 8:33:45 AM   
  daluu

 

Posts: 28
Score: 0
Joined: 4/17/2006
Status: offline
Thanx 4 the script.

Is it dependant on WM player version? I'm assuming the script is written for version 7? What if I have version 6.x, 8, 9, or 10? Will it still work fine for those or will I have to tweak the script a bit?

(in reply to Rischip)
 
 
Post #: 2
 
 RE: Play Media File or PC beep - 8/6/2007 8:52:47 AM   
  Rischip


Posts: 414
Score: 2
Joined: 3/26/2007
Status: offline
7 and above use the same control.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to daluu)
 
 
Post #: 3
 
 RE: Play Media File or PC beep - 8/6/2007 10:19:06 AM   
  daluu

 

Posts: 28
Score: 0
Joined: 4/17/2006
Status: offline
Ok, thanks.

FYI - I just found out you can use command line parameters for Windows Media Player as well. There are some for WMP 11, but they have ones I'm not concerned about. And there are some for WMP 6.x, which will suffice for playing WAV and MP3 files. You'll only run into trouble for WMP 6.x if you play WMA or WMV files for which you can't get an updated WM codec for WMP 6.x. The simple command parameter to play 1 file and close the player is this:

mplayer2.exe /play /close pathToFile

You may have to supply the path to mplayer2.exe which is C:\Program Files\Windows Media Player\, since it's not in the environment path variable. mplayer2.exe is WMP 6.x, whereas wmplayer.exe is for WMP 7+.

(in reply to Rischip)
 
 
Post #: 4
 
 RE: Play Media File or PC beep - 8/6/2007 10:27:38 AM   
  Rischip


Posts: 414
Score: 2
Joined: 3/26/2007
Status: offline
The idea behind the script is to be able to embed standardized functionality, and have no visible application, except of course if you need to play a video.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to daluu)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> Play Media File or PC beep Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts