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.

Time and Date OSD

If you have a question or need help, this is the place to be.
Post Reply
vrienduinen
Posts: 5
Joined: Sat Jul 05, 2008 12:35 am

Time and Date OSD

Post by vrienduinen »

Can someone help me with a python command and OSD. I would like to display the current time with OSD.
Something like eg.event.time (but this just gives me the time since EG start).
I can then display it with OSD {int(eg.result)}
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Time and Date OSD

Post by jinxdone »

Something like this?

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="851">
    <Action>
        EventGhost.ShowOSD(u'Time: {eg.Utils.time.strftime("%H:%M:%S")}', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
    </Action>
</EventGhost>
strftime formatting options

-jinxdone
Post Reply