Copy link to clipboard
Copied
Hey Guys,
I have a button linked to a function. Please see below.
The app.executeCommand(3000) is to launch the create new 'Solid' diagloue box which it does. However when it does this The option to 'make Comp Size' is greyed out. Please see attached image.
Is this any reason for this or is there another way to launch that dialogue and to have that option availible?
btnSolid.onClick = function() {
if (app.project.activeItem == undefined || app.project.activeItem == null) {
alert("Please Select a Composition");
return false;
} else {
app.executeCommand(3000);
}
}
Thanks,
Liam
1 Correct answer
Well... that was easy! I had been using some older MenuID document PDF... turns out I was using one of the ID's
that kind of worked. But there appears to be another one which does work.
I changed the ID from 3000 to 2038
This is where I got the resource - https://hyperbrew.co/blog/after-effects-command-ids/
All working perfectly now.
Copy link to clipboard
Copied
Well, is the comp window/ timeline actually active? Many functions are contextual and require the window focus to be correct. That's a limitation of the whole process and scripts may particularly suffer from this when not taking care of setting these parameters or when their internal functions switch focus.
Mylenium
Copy link to clipboard
Copied
Thanks for replying Mylenium. Ah, I see what you are saying. Yes the solid will created but it doesn't actually populate the composition. It only appears in the project panel.
Hmmm, I'll have to keep doing some digging. Thanks!
Copy link to clipboard
Copied
Well... that was easy! I had been using some older MenuID document PDF... turns out I was using one of the ID's
that kind of worked. But there appears to be another one which does work.
I changed the ID from 3000 to 2038
This is where I got the resource - https://hyperbrew.co/blog/after-effects-command-ids/
All working perfectly now.
Copy link to clipboard
Copied
Nice! Glad that post was helpful 👍
Copy link to clipboard
Copied
Yeah it's great to be able to see all of the older versions too. I've been using David Torno's MenuID PDF or I've been searching myself. It's funny though because when you run the app.findMenuCommandId("insertMenuNameHere"); it's not always accurate. It certainly wasn't for the solid.
Cheers,
Liam
Copy link to clipboard
Copied
Yea for sure, findMenuCommandId() isn't always reliable, and it changes per language as well. The dictionary files are the most reliable method I've found to list them, and then just using the codes per version.
Copy link to clipboard
Copied
Yeah that makes a lot of sense regarding the languages. I was actually reading how you do this on your site yesterday! Coding, so powerful!

