tonyi
New Member
Posts: 4
|
Post by tonyi on Apr 15, 2019 0:45:03 GMT
Hi is it possible in MMM code to make a sound / beep / bell to audio alert the user ?
|
|
tonyi
New Member
Posts: 4
|
Post by tonyi on Apr 15, 2019 11:24:41 GMT
OK so i worked out 2 ways to play sounds. if anybody has a direct command to make a simple sound through MMM code without invoking a new media program to open then please let me know, thanks. 1. Through MMM Code:
by running the *.wav file of the sound you want to play. Functional ... but this MMM command also opens your media player ... not ideal. 9 | RUN ACTION | RUN PROGRAM | C:\Windows\media\Windows Notify System Generic.wav 2. By using a VB command file:
saved from note pad with a *.vbs file extension, then ref the MMM code to the new *.vbs file you created. The VB command to play a sound without opening your media player NOTE: you need to change the path and file name to wherever you save the sound you ant to play: CreateObject("Wscript.Shell").Run "wmplayer /play /close ""C:\Windows\media\Windows Notify System Generic.wav""", 0, False
MMM code to ref the *.vbs file: 9 | RUN ACTION | RUN PROGRAM | C:\Windows\media\Windows Notify System Generic.vbs
little explanation and really very little is required. 1.) Open Windows Notepad 2.) Copy above code into Notepad 3.) Substitute 'Your path & file name' into the code with the full path to the music file you want to play. 4.) In Notepad menu choose File > Save as . . 5.) Choose a location and file a name but ensure that instead of the standard .txt file type you give it a .vbs ending. 6.) Close Notepad 7.) Click on the vbs file you just made and your music file will start to play showing absolutely nothing on the screen & not obviously opening media player. The 0 parameter in the code enables WMP to open in an invisible window. If you change the 0 to a 1 you will see WMP's graphical interface. NOTE: this is only available for Windows users but for them it's the best and simplest solution to the problem.
|
|