send mediaplay command using powershell or vbs or bat
I've got a vbs script that automatically opens the XBox Music app for me
(as part of a larger script) that looks like this:
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.SendKeys "^{ESC}"
WScript.Sleep 1000
objShell.SendKeys WScript.Arguments.Item(0)
WScript.Sleep 1000
objShell.SendKeys "{ENTER}"
What I'm struggling with is I want to then send the virtual keyboard key
MediaPlay (used on multimedia keyboards to trigger music playing) so that
Xbox Music automatically begins playing on load. Unfortunately sendkeys
doesn't support MediaPlay and I can't find a vbscript command that will do
it for me.
Since I'm running this script from a batch file, I can go with a batch
file, vbs or powershell script that will do it, but I'm clean out of
ideas.
No comments:
Post a Comment