trying to get mm (mins) briefly displayed.
What's wrong with this here script?
import time
min = time.localtime()[3]
eg.plugins.EventGhost.ShowOSD(eg.globals.min, None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 0.5)
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 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.
ShowOSD parameters
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
If you don't want to export "min" as a global you can do:
If you want to export it you have to do:
Code: Select all
import time
min = time.localtime()[3]
eg.plugins.EventGhost.ShowOSD(str(min), None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 0.5)Code: Select all
import time
eg.globals.min = time.localtime()[3]
eg.plugins.EventGhost.ShowOSD(str(eg.globals.min), None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 0.5)- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
But if this is all you want to do, I would suggest to only do the calculation in the script, like this:
and make a ShowOSD action directly afterwards with "{eg.result}" (without quotes) as parameter.
This way it is easier to configure the appearance of the OSD.
Code: Select all
import time
eg.result = str(time.localtime()[3])
This way it is easier to configure the appearance of the OSD.
Last edited by Bitmonster on Tue Aug 01, 2006 6:17 pm, edited 1 time in total.