Here is one example of the use of new capabilities OSM.
You can easily (using the OSM) select the album, which will be played in MediaMonkey.
I think that the pictures need no comment.
Python Script contains the following code:
Code: Select all
tmp = [item.split("\t") for item in eg.result]
tmp = [(item[2]+" - "+item[1],item[0]) for item in tmp]
tmp = [(item[0].upper(), item) for item in tmp]
tmp.sort()
eg.result = [item[1] for item in tmp]
OS Menu example whole script:
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1436">
<Folder Name="OS Menu example" Expanded="True">
<Macro Name="OS Menu: Show menu, created from expression" Expanded="True">
<Action>
FileOperations.Read(1, u'D:\\Data\\M\\MediaMonkey\\AlbumJukebox.txt', 0, 1, 'utf8', 1, False, 0)
</Action>
<Action>
EventGhost.PythonScript(u'tmp = [item.split("\\t") for item in eg.result]\ntmp = [(item[2]+" - "+item[1],item[0]) for item in tmp]\ntmp = [(item[0].upper(), item) for item in tmp]\ntmp.sort()\neg.result = [item[1] for item in tmp]\n')
</Action>
<Action>
OSM.CreateMenuFromList(u'eg.result', (255, 255, 94), (64, 0, 64), u'0;-16;0;0;0;700;255;0;0;238;3;2;1;66;Monotype Corsiva', u'OSM.Album', 0, 1)
</Action>
</Macro>
<Macro Name="Album jukebox" Expanded="True">
<Event Name="OSM.Album" />
<Action>
MediaMonkey.Jukebox(2, 2, 2, True, u'D:\\Data\\M\\MediaMonkey\\AlbumJukebox.txt', True)
</Action>
</Macro>
</Folder>
</EventGhost>
Pako