Page 2 of 2

Re: app.executeCommand(...) List - work in progress (for CS3)

Posted: July 2nd, 2008, 8:27 am
by byronnash
Creating and accessing the new comp isn't the problem. It's the "Save Photoshop Layers..." command only works on an active comp(i.e. one that's open and visible in the comp viewer) Items that are selected in project window don't show as activeItem. I'm guessing I'm just out of luck here.

Re: app.executeCommand(...) List - work in progress (for CS3

Posted: April 2nd, 2012, 7:54 am
by mmohl
using app.findMenuCommandId() is nice to avoid problems when the ids change with a new version, but it makes the script UI language dependent.

Code: Select all

app.executeCommand(app.findMenuCommandId("Close"));
only works, for example, with the English version.

Code: Select all

app.executeCommand(app.findMenuCommandId(localize({en:"Close",de:"Schließen"})));
works on a German system, too, as long as I run the German version with the German interface. If I force the German version to start with the English interface, it fails again.

Is there an elegant way to solve this or do I have to check the AE version and hardcode a MenuID for each?
Is it save to assume that the MenuIDs do not change within one version?

Best
Mathias