Ok, I Have just tried the vlc plugin to see how it behaves.
All the info are passed to the event suffix.
This brings a bit complexity.
To be able to retrieve the current playing file, you will have to do a macro that is triggered withh all VLC events.
To do that you have to assign it the VLC.* event (the star only works for full event suffix).
To extract the file name from the event suffix, you will need to parse it in a python script (the python script is a basic eventghost action)
you can access the event suffix with eg.event.suffix
once you have it, you will have to check if it's a new input invent.
something like if (suff.find('new input')>0): should to the trick
then you will have to get rid off all the unneeded stuff (status change: (new input: ...)
in python, you can do that like this :
suff[suff.find("new input: ")+len("new input: "):-2]
the following code can be pasted directly in eventghost (it will create a new folder with 2 macro inside) and should work :
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
<Folder Name="Display SourceFile" Expanded="True">
<Macro Name="Read FileName">
<Event Name="VLC.*" />
<Action Name="Extract FileName">
EventGhost.PythonScript(u'suff = eg.event.suffix\nfileName=""\nif (suff.find(\'new input\')>0):\n fileName=suff[suff.find("new input: ")+len("new input: "):-2]\n eg.TriggerEvent(prefix="Main",suffix="DisplayVLCSourceFile",payload=fileName)\n ')
</Action>
</Macro>
<Macro Name="Display VLC Source">
<Event Name="Main.DisplayVLCSourceFile" />
<Action>
EventGhost.ShowOSD(u'{eg.event.payload}', u'0;-64;0;0;0;700;0;0;0;0;3;2;1;34;Arial', (0, 255, 0), (0, 0, 0), 4, (0, 0), 0, 3.0, False)
</Action>
</Macro>
</Folder>
</EventGhost>