Skip to main content
Pedro Cortez Marques
Legend
Jul 1, 2011 3:13 PM UTC
Question

javascript disable "Show Items from Subfolder"

How can I disable the ON/OFF submenu command  View>Show Items from Subfolder (MenuID: FlatView) with javascript?

Tks

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Inspiring
Jul 2, 2011 3:46 PM UTC

What exactly do you mean by disable? This menu item has a toggle state so you can switch on/off via chooseMenuItem('FlatView');. Its an app defined menu not script defined so I don't think there is any way in which you can remove it from its parent menu…

Translate
Pedro Cortez Marques
Legend
Jul 4, 2011 8:26 AM UTC

I have manage to activate by code this ON/OFF option "Show Items from Subfolder", but I couldn't do it from Bridge itself. I only dis it from Photoshop.

Like this:

(...)

to activate it

    bt = new BridgeTalk();
    bt.target = "bridge";
    bt.body = "app.document.chooseMenuItem('FlatView');";
    bt.send(8);
    bt.pump();
// to deactivate it
    bt = new BridgeTalk();
    bt.target = "bridge";
    bt.body = "var hhh=app.document.chooseMenuItem('FlatView'); hhh=false;";
    bt.send(8);
    bt.pump();

(...)

Translate
Inspiring
Jul 4, 2011 9:22 AM UTC

Pedro, like I said this menu is a 'toggle'…

run…

#target bridge app.document.chooseMenuItem('FlatView');

and you will get the sub items… Run the same command again and it will toggle to OFF…

Translate