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.

Show windows with computer time

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
mywayfr
Posts: 14
Joined: Fri Apr 06, 2012 8:18 am

Show windows with computer time

Post by mywayfr »

hello,
Somes time I need to know what is the current time while watching a movie(mediaplayer classic).
I don't find any source for that in Eventghost.
After searching on the net I've try this script:
#!/usr/bin/python
import time;

localtime = time.asctime( time.localtime(time.time()) )
print "Maintenant:", localtime

It works on the eventghost log, but I wish to show the result on the screen in first front.

Is that possible?

Many thanks, cheers :D
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Show windows with computer time

Post by jonib »

mywayfr wrote:Is that possible?
Of course.

Add eg.result = localtime after the print line in the Python script. Then add a Show OSD action right after the Python script with {eg.result} in the Text to display: area.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: Show windows with computer time

Post by piert »

OSD is your friend in this case.

You find your answer here:
http://www.eventghost.org/forum/viewtop ... f=2&t=2261

Good Luck
mywayfr
Posts: 14
Joined: Fri Apr 06, 2012 8:18 am

Re: Show windows with computer time

Post by mywayfr »

Many thanks for both of you :D

I will try those path

See you, cheers
Post Reply