Yokemate of Keyboards
Posts: 2096 from 2003/2/24
From: po-RNO
Quote:
Cool_amigaN wrote:
However, I am having difficultied understanding how to use your scripts. I 've copied the script to the folder required but in your example screenshot it has an extension of "play". This means that I should create 4 individual scripts (play, forward, previous, stop)?
The same script must be executed with different argument for different jobs. So, if you're defining MMKeyboard command for your play button, you use "play" argument. And same way if you're defining MMKeyboard command for your next button, you use "next" argument. The actual script stays the same, but yes, you have to create individual entries for each case, and example screenshot was just one of them.
If you copied MultiMeedio.lua script to S: as suggested, you can do those mentioned functions like:
MOSSYS:C/LuaX S:MultiMeedio.lua play
MOSSYS:C/LuaX S:MultiMeedio.lua next
MOSSYS:C/LuaX S:MultiMeedio.lua prev
MOSSYS:C/LuaX S:MultiMeedio.lua stop
etc...
Possible arguments are Play, Next, Prev, Stop, Pause, Random, Mute, VolUp, VolDown, GlobMute, GlobVolUp, GlobVolDown, FS and Quit.
You can run those lines from shell too to test how they work.
For example, if you run "MOSSYS:C/LuaX S:MultiMeedio.lua pause" command and you have MPlayer running, it pauses MPlayer. But if you happen to have AmiNetRadio running, it pauses it. You don't need to tell which player you are using, because the script detects the running player automatically. It works "universally".
Quote:
Should I comment anything specific inside the script?
Script should work as it is without any modifications, but if you want to define the default player to something else than Jukebox, then you can edit the two lines in quite beginning of the script. Default player is started, if no other player is found running.
[ Edited by jPV 03.02.2015 - 15:11 ]