Hi
How easy would it be to add in the function to retain global variables over a restart. Maybe to write them out to a file on shutdown and have the option to read them again when EG starts.
When updating a plug in you need to restart EG, or if the machine is being restarted. For both the these you lose any globals you may have (I have a couple with temperature and whether internal doors are open or closed), it would be handy to have the option to store them.
Maybe this could be as a plug in or part of the program.
thanks
Phil
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.
Retain global variables on restart
Re: Retain global variables on restart
Already available. Search the forum for 'persistent values' .
Re: Retain global variables on restart
Thanks, I've read the posts about persistent variables but the main one seems a very undeveloped idea and one that recommends against saving eg.globals variables across sessions, also it seems quite a complicated solution for a non-programmer.
If you could easily export the eg.globals to a text file and be prompted whether to reload them on start it would be much simpler.
If you could easily export the eg.globals to a text file and be prompted whether to reload them on start it would be much simpler.
Re: Retain global variables on restart
If a number of clever people on this forum have already chewed on the subject for some time and this is what they came up with, I doubt it could be done much simpler or better.