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

Minimize panel group?

Engaged ,
Jun 26, 2018 Jun 26, 2018

Is there a way to minimize a panel group (not close it). I have a script that takes color samples. This always opens up the info panel group and leaves it open.

The follow script closes it but that is not what I want to do.

app.runMenuItem (stringIDToTypeID ("closeInfoPanelGroup"));

Basically, I want to do what the highlighted button in the screen shot does.

minimize.jpg

TOPICS
Actions and scripting
1.2K
Translate
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
Adobe
Engaged ,
Jun 26, 2018 Jun 26, 2018

OK, so I found it in on a post in another website. Works great.

app.runMenuItem (stringIDToTypeID ("toggleInfoPalette"));

Translate
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
Enthusiast ,
Jun 26, 2018 Jun 26, 2018
LATEST

Hi,

The only problem is that it never knows if it is already visible or invisible.

This solves that (the code is old and is not mine - sorry I can't remember its author).

The advantage (with some errors in some of the panels) is that you can use this over the panels:

//

// this is the full list of all palettes

//~ Tools

//~ Pen Options

//~ Actions

//~ Styles

//~ Swatches

//~ Histogram

//~ Info

//~ Paths

//~ Tool Presets

//~ Color

//~ Channels

//~ Layers

//~ Layer Comps

//~ Timeline

//~ Clone Source

//~ Measurement Log

//~ History

//~ Navigator

//~ Character

//~ Paragraph

//~ Character Styles

//~ Paragraph Styles

//~ Glyphs

//~ Notes

//~ 3D

//~ Adjustments

//~ Properties

//~ Modifier Keys

//~ Brush

//~ Brush Presets

//~ Device Preview

//~ Libraries

// for example I want to open the Paths pallete if closed:

//~ openClosePSPanels("Info", true);

//~ // for example I want to close the Paths pallete if opened and it has focus:

openClosePSPanels("Info", false); // this only works if the Path panel has the focus

function openClosePSPanels(name, visibility) {

    var panelList = listPanels();

    for ( var a in panelList ) {

        if ( panelList[0].toString() == name) {

            if (panelList[1].toString()  !=  visibility.toString()) {

                if (panelList[0].toString() == "Notes") name = "Annotation"; // exception on Notes palette

                try {

                    app.runMenuItem ( stringIDToTypeID ("toggle" + name.replace(/\s/g,'') + "Palette") );

                } catch (e) {}

                break;

            }

        }

    }

   

    function listPanels() {

        var ref = new ActionReference();

        Info = new Array();

        ref.putProperty( stringIDToTypeID("property"), stringIDToTypeID("panelList") );

        ref.putEnumerated( stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum") );

        var desc = executeActionGet(ref).getList( stringIDToTypeID("panelList") );

        for( var a = 0; a<desc.count; a++ ) {

            var Name = desc.getObjectValue(a).getString( stringIDToTypeID("name") );

            var Vis = desc.getObjectValue(a).getBoolean( stringIDToTypeID("visible") );

            var Ob = desc.getObjectValue(a).getBoolean( stringIDToTypeID("obscured") );

            var ID = desc.getObjectValue(a).getString( stringIDToTypeID("ID") );

            Info.push( [[Name], [Vis], [Ob], [ID]] );

        }

        return Info;

    }

}

// ARRAY of Palettes:

//~ Tools,true,false,panelid.static.toolbar

//~ Brush Options,true,false,panelid.static.options

//~ Actions,false,false,panelid.static.actions

//~ Styles,false,false,panelid.static.styles

//~ Swatches,false,false,panelid.static.swatches

//~ Histogram,false,false,panelid.static.histogram

//~ Info,false,false,panelid.static.info

//~ Paths,false,false,panelid.static.paths

//~ Tool Presets,false,false,panelid.static.toolpresets

//~ Color,false,false,panelid.static.picker

//~ Channels,false,false,panelid.static.channels

//~ Layers,true,false,panelid.static.layers

//~ Layer Comps,false,false,panelid.static.comps

//~ Timeline,false,false,panelid.static.animation

//~ Clone Source,false,false,panelid.static.clonesource

//~ Measurement Log,true,false,panelid.static.measurement

//~ History,true,false,panelid.static.history

//~ Navigator,false,false,panelid.static.navigator

//~ Character,false,false,panelid.static.textcharacter

//~ Paragraph,false,false,panelid.static.textparagraph

//~ Character Styles,false,false,panelid.static.textcharstyle

//~ Paragraph Styles,false,false,panelid.static.textparastyle

//~ Glyphs,false,false,panelid.static.textglyphspanel

//~ Notes,false,false,panelid.static.annotation

//~ 3D,false,false,panelid.static.3d

//~ Adjustments,false,false,panelid.static.create

//~ Learn,false,false,panelid.static.learn

//~ Properties,false,false,panelid.static.properties

//~ Brush Settings,false,false,panelid.static.brushstyler

//~ Brushes,false,false,panelid.static.brushpresets

//~ Libraries,false,false,panelid.dynamic.swf.csxs.com.adobe.DesignLibraries.angular

//~ Adobe Color Themes,false,false,panelid.dynamic.swf.csxs.KLR

//

Translate
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