Page 1 of 1

Programmatically change a certain setting in Preferences Window

Posted: Wed Sep 19, 2018 8:17 pm
by vision1776
In the Preferences window, in the General tab, I need a way to access the setting called "Show Start Workspace When No Documents Are Open" through code or some other way other than manually going in there and setting it.

I have tried looking into the

Code: Select all

app.preferences
object properties and this setting doesnt seem to be found anywhere. I have looked around in the registry and nothing there. I have also tried looking for some cofig json or xml but no luck either.

If anyone knows of any way that I can set that from code or editing a config file or registry please let me know.

My sincere thanks

Re: Programmatically change a certain setting in Preferences Window

Posted: Thu Sep 20, 2018 1:53 pm
by Kukurykus
Send me PM for more questions:

Code: Select all

sTT = stringIDToTypeID; function wS(v) {
(ref = new ActionReference()).putProperty(sTT('property'), gP = sTT('generalPreferences'))
ref.putClass(sTT('application')); (dsc1 = new ActionDescriptor()).putReference(sTT('null'), ref);
(dsc2 = new ActionDescriptor()).putBoolean(sTT('welcomeScreen2'), !!v)
dsc1.putObject(sTT('to'), gP, dsc2), executeAction(sTT('set'), dsc1)
}

wS()