Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through
Buy Me a Coffee or
Ko-fi . Thank you for helping preserve the EventGhost community.
If you have a question or need help, this is the place to be.
stisev
Experienced User
Posts: 162 Joined: Tue Jun 26, 2007 2:55 am
Post
by stisev » Wed Jan 23, 2008 6:52 am
Hi all,
Title says it all (not really).
What I want to do is press REWIND button and have EG give me the following information:
Song elapsed / duration. Now, the plugins are already there, but the problem is, is that I want
both of them in a single OSD line display .
For example:
OSD displays
Winamp: Rewind (5:00/5:59)
Here is the code for the winamp info retrieval. Can anyone achieve the aforementioned?
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Action>
Winamp.GetElapsed()
</Action>
</EventGhost>
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Action>
Winamp.GetDuration()
</Action>
</EventGhost>
Pako
Plugin Developer
Posts: 2294 Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:
Post
by Pako » Wed Jan 23, 2008 8:42 am
Perhaps help this:
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Macro Name="Get Song Elapsed/Duration" id="1403" Expanded="True">
<Action>
Winamp.GetDuration()
</Action>
<Action>
EventGhost.PythonCommand(u'eg.globals.duration=eg.result')
</Action>
<Action>
Winamp.GetElapsed()
</Action>
<Action>
EventGhost.PythonScript(u'import time\nif eg.globals.duration>3599:\n pos=13\nelse:\n pos=10\neg.result=" ("+time.ctime(eg.result+82800)[-pos:-5]+"/"+time.ctime(eg.globals.duration+82800)[-pos:-5]+")"\n')
</Action>
<Action>
EventGhost.ShowOSD(u'Winamp: Rewind {eg.result}', u'0;-48;0;0;0;700;0;0;0;238;3;2;1;66;Comic Sans MS', (0, 0, 255), (0, 0, 0), 2, (0, 0), 0, 5.0)
</Action>
</Macro>
</EventGhost>Pako
stisev
Experienced User
Posts: 162 Joined: Tue Jun 26, 2007 2:55 am
Post
by stisev » Wed Jan 23, 2008 4:01 pm
Pako,
Once again your script is 100% working and amazing! Thank you, thank you!!