Using app.executeCommand() for New Solid Dialog Box

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
christianlett
Posts: 1
Joined: January 23rd, 2010, 9:09 am

Hi,

I'm writing a little UI script for AE CS5 and I want to invoke the New Solid dialog box with the app.executeCommand() function.

Currently I'm finding the command ID using the line of code:

Code: Select all

app.executeCommand(app.findMenuCommandId("Solid..."));
However the dialog box I'm presented with doesn't offer the Make Comp Size button (it's greyed out), and the resulting solid is not inserted into the open comp. On investigation I realised this was because there are two menu "Solid..." menu options and it's evaluating the wrong one first (File -> Import -> Solid...)

Does anyone know the correct command ID for the Layer -> New -> Solid...?

I'd prefer not to have to build the dialog box myself if I can help it!

Thanks,

Christian
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

app.executeCommand() is an unsupported feature and Adobe discourages its use for reasons like you found plus it might not work consistently from version to version. You can create a new solid using the addSolid() method on pg94 of the CS3 scripting guide.

-Lloyd
Post Reply