User Tools

Site Tools




Function to load the value of a specific setting that has previously been saved to the settings file.


  • All scripts use the same settings file. Because of this, settings can be shared by multiple scripts. Make sure to assign unique setting names when settings are to be unique for a script.
  • I have tested this function with all levels of User Account Control on windows 7 and I found no problems. If you do find a problem with writing files, please contact me.


To read a setting for the opened project:

var setting = loadSetting('mysetting', 'project');

To read a system wide setting:

var setting = loadSetting('mysetting',  'global');


Parameter Data type Required Description
setting string true The name of the setting to retrieve
scope string true The scope of the settings file. Use project for a setting saved in the current project or use global for a setting saved for your user account on the current machine

Return Values

Value Meaning
array The value of the setting when the setting has multiple values
string The value of the setting when the setting has only a single value
null Could not retreive the setting
settings/loadsetting.txt · Last modified: 2017/06/03 13:44 (external edit)