Page 1 of 1

Using app.executeCommand() for New Solid Dialog Box

Posted: April 24th, 2011, 11:07 am
by christianlett
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

Re: Using app.executeCommand() for New Solid Dialog Box

Posted: May 18th, 2011, 3:40 pm
by lloydalvarez
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