Forth, we learned you can call a Video File and it will automatically open in Media Player if that is set as your default player:
Fifth, we learned there is a method for granular control of the alternative media player called "WinAmp" using another 3rd party application control "CLEver". This thread discusses that method.
Sixth, we learned how we can control Windows Media Player to play a play list, stop, play, pause, next track, previous track, mute, unmute, volume up, volume down and close by using a combination of built in Script functions, Batch (.bat) files and PowerShell (.ps1) script files.
Batch files are a long time standard of Windows and dates back to DOS as a method to automate and script basic functions in the OS.
PowerShell is scripting language from Microsoft which is free and comes packaged with Windows7 and 8.x. It utilizes .Net framework and is used in the IT profession to help manage windows systems. It can be a powerfull and easy way to add external controls to EZ-Builder that EZ-Builder does not currently include.
The sample files you'll need including the batch files and power shell files can be found here under Software: http://www.j2rscientific.com
To open a Play List with Media Player, you need to create a play list under Windows Media Player, then create a short cut file (.lnk) of the play list. EZ-Builder can use this to launch the play list. Use this EZ-Builder Script:
Exec("C:\Users\weyou_000\Documents\EZ-Builder\My Projects\ShortCuts\All 80's.lnk")
To close Media Player, use this EZ-Builder Script:
$attributes = "/F /IM wmplayer.exe"
Example of Batch file (.bat) code to call a PowerShell script (because EZ-Builder can't do it directly):
powershell -ExecutionPolicy RemoteSigned -File "C:\Users\weyou_000\Documents\EZ-Builder\My Projects\PowerShell\Mute_Unmute.ps1"
Example of PowerShell script to control mute and unmute:
$wshShell = new-object -com wscript.shell
The PowerShell script is sending a keyboard character 173, which is the code to mute/unmute. The follow are the key codes used in the various PowerShell Scripts:
Volume Down: 174
Volume Up: 175
Next Track: 176
Previous Track: 177
Stop Media: 178
These key commands were found here.
Example of EZ-Builder script to call the Batch file to control mute and unmute:
Please watch the YouTube video tutorial: