Copy link to clipboard
Copied
In Photoshop CC2015+ jsx script I want to turn off the General Preference - 'Show start workspace when no documents open' - but have not been able to find the property name.
Can anyone help?
Thanks.
pjb
Try )
...set_app_prefs("generalPrefs", "welcomeScreen2", false);
////////////////////////////////////////////////////////////////////////////////////////////
function set_app_prefs(pref_key, prop_key, value)
{
try
{
if (typeof(pref_key) == "string") pref_key = stringIDToTypeID(pref_key);
if (typeof(prop_key) == "string") prop_key = stringIDToTypeID(prop_key);
var d1 = new ActionDescriptor();
var d2 = new ActionDescriptor();
var r = new ActionReference()
Copy link to clipboard
Copied
Try )
set_app_prefs("generalPrefs", "welcomeScreen2", false);
////////////////////////////////////////////////////////////////////////////////////////////
function set_app_prefs(pref_key, prop_key, value)
{
try
{
if (typeof(pref_key) == "string") pref_key = stringIDToTypeID(pref_key);
if (typeof(prop_key) == "string") prop_key = stringIDToTypeID(prop_key);
var d1 = new ActionDescriptor();
var d2 = new ActionDescriptor();
var r = new ActionReference();
r.putProperty( charIDToTypeID( "Prpr" ), pref_key );
r.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
d1.putReference( charIDToTypeID( "null" ), r );
d2.putBoolean( prop_key, value );
d1.putObject( charIDToTypeID( "T " ), pref_key, d2 );
executeAction( charIDToTypeID( "setd" ), d1, DialogModes.NO );
}
catch (e) { alert(e); }
}
Copy link to clipboard
Copied
r-bin,
Thanks for your help.
pjb