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.

Retain global variables on restart

Got a good idea? You can suggest new features here.
Post Reply
Phil
Experienced User
Posts: 111
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Retain global variables on restart

Post by Phil »

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
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: Retain global variables on restart

Post by piert »

Already available. Search the forum for 'persistent values' .
Phil
Experienced User
Posts: 111
Joined: Tue Apr 15, 2014 10:42 am
Location: Merseyside, UK

Re: Retain global variables on restart

Post by Phil »

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.
piert
Experienced User
Posts: 321
Joined: Tue Jun 14, 2011 2:53 pm

Re: Retain global variables on restart

Post by piert »

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.
Post Reply