Skip to main content
Inspiring
March 3, 2022
Answered

Scripting - app.executeCommand(3000)

  • March 3, 2022
  • 2 replies
  • 2596 views

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 

This topic has been closed for replies.
Correct answer LiamCarlin

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.

2 replies

LiamCarlinAuthorCorrect answer
Inspiring
March 3, 2022

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.

Justin Taylor-Hyper Brew
Community Expert
Community Expert
March 3, 2022

Nice! Glad that post was helpful 👍

Inspiring
March 3, 2022

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

Mylenium
Legend
March 3, 2022

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

Inspiring
March 3, 2022

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!