# Can I make a BAT file that plays the next track (like multimedia keys)?

I would also like to be able to play the previous track and play/pause. The problem is my keyboard doesn't have multimedia keys, so I want to setup hotkeys to do the same thing.

• which media player? – fluxtendu Apr 2 '10 at 2:03
• Foobar has /play, /pause, /next, so on so you can run them from a command line. I imagine many other players do too. – Phoshi Apr 2 '10 at 8:58

Not as far as I know. Are you familiar with scripting in AutoHotkey?

As described here, you can create a powershell script which gets called by a batch file:

script.ps1:

$wshShell = new-object -com wscript.shell$wshShell.SendKeys([char]176)


next_track.bat:

powershell -ExecutionPolicy RemoteSigned -File "C:\path\to\your\script.ps1"


There's also a list of other keys:

Mute/Unmute: 173
Volume Down: 174
Volume Up: 175
Next Track: 176
Previous Track: 177
Stop Media: 178
Play/Pause: 179

Your best bet would be to use Autohotkey as this allows you to map keyboard shortcuts for most programs.

http://www.hacksar.com/blog/2009/03/09/how-to-control-itunes-from-anywhere-autohotkey/

look here