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.
Is it possible to show a variable on screen through the OSD via a python script. I can't seem to find any reference to this in the forum.
I want to show a variable like this
eg.plugins.ShowOSD(eg.globals.my_var)
Is there a list somewhere of what functions can be called from eg?
Please go easy on me, I only just found EventGhost today and am loving it already
Thanks in advance
Under the EG help menu there is the python shell option. If you click this, it brings up a command line python shell, with the eg object already imported - but with autocompletion. So if you type "eg.", the list of available members/functions of eg will be listed.
From this, I was able to find ShowOSD as part of a dictionary under eg.plugins.EventGhost.actions. I tested the following and it seems to work:
richy759 wrote:Is it possible to show a variable on screen through the OSD via a python script. I can't seem to find any reference to this in the forum.
I want to show a variable like this
eg.plugins.ShowOSD(eg.globals.my_var)
thanks guys, the python shell under help is exactly what I want to show me whats available.
Bitmonster, I did look at that page, which is a nice summary, but didn't really help me in my case. Perhaps it could mention the python shell under help.
topix, I have taken your example and it works nicely. Are the arguments to ShowOSD documented?