key : the key code for the value to set.
domain ( optional ) : the domain value of where to locate the preference file.
If the domain is not included, it will be
Mac / iOS : au.com.goya.baseelements.plugin-user
Windows : Software\\Goya\\BaseElements\\PluginUser ( stored inside HKEY_CURRENT_USER ).
Linux : does not run, will return error 3 - Command is unavailable.
You can override the domain to specify a different file name on the mac, or a different path on Windows. To respect the various OS conventions you should use something similar to the above.
Result : 1 if storing the preference was successful, "?" if there was an error.
Notes : this function is required in some situations as the user can't directly delete preferences files to remove a stored preference. For example on the Mac, Setting a preference will create a corresponding file in the Users Library/Preferences folder. However deleting that file does not delete this preference until logout.