Skip to main content
Pedro Cortez Marques
Legend
July 1, 2011
Question

javascript disable "Show Items from Subfolder"

  • July 1, 2011
  • 1 reply
  • 1058 views

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

Tks

This topic has been closed for replies.

1 reply

Inspiring
July 2, 2011

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…

Pedro Cortez Marques
Legend
July 4, 2011

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

(...)

Inspiring
July 4, 2011

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…