It is currently April 26th, 2024, 9:38 pm
Global Options for Plugins
-
- Posts: 2
- Joined: August 4th, 2013, 7:32 pm
Global Options for Plugins
Hey guys, I'm writing a plugin for rainmeter wanted to know if there is a way to set-up global Options for plugins. I read in the documentation in the [Rainmeter] section is where you set this up, but this does not seem to be the case for plugins, which want each option defined explicitly in each measure. My current idea is have users who wish to use my plugin set up a one-time config file in the Plugins folder, but this seems a bit excessive if there is an easier way, thanks!
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Global Options for Plugins
You can use RmGetSettingsFile() to obtain the path to #SETTINGSPATH#Rainmeter.data (i.e. %APPDATA%\Rainmeter\Rainmeter.data), which is generally where plugins store global data under a section named after the plugin (e.g. [YourPlugin.dll]).
-
- Posts: 2
- Joined: August 4th, 2013, 7:32 pm
Re: Global Options for Plugins
Thanks! Is there a best practice as to how to get data in there, I would rather not tell users they are going to have to edit that by hand.
Would it be safe to have my plugin check if there are values in the file and if not pull and import ones from a general measure to there?
Would it be safe to have my plugin check if there are values in the file and if not pull and import ones from a general measure to there?
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Global Options for Plugins
That is really the only way unless you want to provide some sort of custom UI (e.g. a separate executable).BadStreff wrote:Thanks! Is there a best practice as to how to get data in there, I would rather not tell users they are going to have to edit that by hand.
Sure (remember to only touch the [YourPlugin.dll] section).BadStreff wrote:Would it be safe to have my plugin check if there are values in the file and if not pull and import ones from a general measure to there?