• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JS - Photoshop CC - clear Show start workspace when no documents open preference

Participant ,
Dec 15, 2017 Dec 15, 2017

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

TOPICS
Actions and scripting

Views

492

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Dec 15, 2017 Dec 15, 2017

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()

...

Votes

Translate

Translate
Adobe
People's Champ ,
Dec 15, 2017 Dec 15, 2017

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); }

    }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 16, 2017 Dec 16, 2017

Copy link to clipboard

Copied

LATEST

r-bin,

Thanks for your help.

pjb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines