Copy link to clipboard
Copied
Hey!
Does anyone know if it is possible to get a list of all the reference names for the executeCommand(); function?
To be more specific; i'm talking about a list of all possible "number names", like the one highlighted in red
app.executeCommand(2359);
2359 = Preferences
JesB
1 Correct answer
Here is the post, I just put it up.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Searching the forums can help a great deal, but check out this old thread:
Copy link to clipboard
Copied
It might be worth creating a new Document for this. Never tried so i don't know how it works...
Something that anyone in the After Effects Scripting community can edit/ add new entry: english name / commandID / more info about how to use
Some are kind of obvious, some not at all.
Copy link to clipboard
Copied
Thanks for all the replies, I appreciate it
UQg: it sounds like a good idea.
If no one has already started to create a document for this, and if I got time for it I might do some research and create one.
JesB
Copy link to clipboard
Copied
By doing some research I found this list, but i haven't checked if all the codes work in newer versions of AE.
However i still think it a good idea to create a forum document so everybody can share the command codes.
Code list:
http://www.sundstedt.se/aescripts/AE_CS3_Command_IDs.pdf
JesB
Copy link to clipboard
Copied
I'm already working on a CC version as well as a CC 2014 version.
Copy link to clipboard
Copied
Awesome David, will you announce it at the forum when it's finished?
Copy link to clipboard
Copied
Of course. I'm almost done with the CC list, just tons of typing at the moment. I'm just insane enough to tackle such a list.
Copy link to clipboard
Copied
Here is the post, I just put it up.
Copy link to clipboard
Copied
A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/EE_Config.php
Line Number: 207
Can't connect.
David, beside this issue, i'm curious how you could manage creating that list. Any tip ?
Xavier.
Copy link to clipboard
Copied
Try it again, it should work right now, I just tried both links for the site and pdf. PVC has been having this random error. They are looking into it.
As far as making the list. A lot of manual typing. I spent two days screen capping the menu command dropdowns, then using text edit I typed up each command string. After which I built a script to read into the text, strip ot tabs, carriage returns, then convert the list into an array. I then looped through that array and piped each item through the app.findMenuCommandId() method to get ID. I made it a multi dimensional array with menu name and ID. I took that array and created a new document from it. The rest was manual labor of flipping the doc to rtf and then color coding the possible issue items.
As far as I know there is no way to simply just query the object to get the ID's, so I went the MacGyver right.
Copy link to clipboard
Copied
Wow big work.
Glad to know that the Scripting help has its own commandId.
There are more though All the contextual ones (right-click a layer > Reveal Expression Errors.... that's the one i'm after for some time.. doesnt work)
Apparently the ones with negative id's require some particular settings, which i can't figure out.
Xavier.
Copy link to clipboard
Copied
There are more though All the contextual ones (right-click a layer > Reveal Expression Errors.... that's the one i'm after for some time.. doesnt work)
Apparently the ones with negative id's require some particular settings, which i can't figure out.
Xavier.
And this is where the community support comes into play. I would like to keep updating the document with missing/incorrect stuff. Not all menu commands will have an ID assigned (no ID means we can't use them in ExtendScript unfortunately), but the ones that do, we can add to the list. If you do find one(s) let me know. I will dabble on my own as well over time and see if I can find more. It simply boils down to adding the menu name into this code:
alert(app.findMenuCommandId("insert menu command name"));
The number that pops up is what it is, barring the duplicate name issue I mention repeatedly in the pdf though.
Thank you David, and really great work with the list
Thanks Jes, hopefully we can improve it over time.
Copy link to clipboard
Copied
Hi David,
Thanks for the super useful list.
Here's a couple other commands. (tested with After Effects CC)
The most recent Undo: 16
The most recent Redo: 2035
(These don't seem to matter what the exact name of the undo/redo command are, they just always run the most recent)
Also, do you know if there is a way to get the name of the menu item if you only have the ID number?
Copy link to clipboard
Copied
Here's a couple other commands. (tested with After Effects CC)
The most recent Undo: 16
The most recent Redo: 2035
(These don't seem to matter what the exact name of the undo/redo command are, they just always run the most recent)
Thanks, I was about to post a new updated pdf shortly with a ton more commands I processed today. I will add these as well. Appreciate it.
Also, do you know if there is a way to get the name of the menu item if you only have the ID number?
Sadly no. I haven't found a way to do that. It would make life easier in making this list.
Copy link to clipboard
Copied
There's also a few more, but I don't know how usable they are.
The entire history stack can be accessed with ID numbers.
Basically if the history stack was something like:
Undo New Composition
Undo New Layer
Undo Change Value
-------------------------------
Redo Parent
Redo Add Shape Layer
Then the IDs would be:
Undo New Composition : -1048577
Undo New Layer: -1048578
Undo Change Value 16
-------------------------------
Redo Parent 2035
Redo Add Shape Layer -1048582
Redo Add Camera Layer -1048583
The stack always starts at -1048577 and then counts downward by 1 (skipping over 3 numbers when Undo changes to Redo)
Copy link to clipboard
Copied
Interesting and confusing. I'll hold off on those until further investigating. I did add your other two, plus 100 new contextual menu commands. Going to upload the pdf now.
Copy link to clipboard
Copied
New AECC_MenuIDs_v1_1.pdf is now live.
Copy link to clipboard
Copied
Hi David!
I got this plugin that I wrote for my own scripting that could be usefull.
You'll find 2 different plugs: CMD_AEGP & CMD_AEGP_Prompt (copy them anywhere in the plugins folder, PC only).
The first one prints the Command's ID in the info panel. It's the one I use the most. However, for some commands, AE will overwrite it really fast...
That's where the second plugin becomes usefull: it prompts an alert box with the Command ID. The problem with this one (appart the fact that it's super boring if you forgot to remove it ) is when you got it installed, you'll have to force AE to close. (it sounds pretty messy, but it's the only way I found to have it working on any version since CS5 to CC 2014)
Hope you like it!
https://dl.dropboxusercontent.com/u/52167965/CMD_AEGP.zip
Cheers,
François
Copy link to clipboard
Copied
Thanks François, I will give this a try at work, as I do not have access to a PC at home.
Copy link to clipboard
Copied
françois leroy , thanks!
Works like a charm.
Copy link to clipboard
Copied
And here is the Mac version of François's plug-in:
https://www.dropbox.com/s/bvmmmlkkhttnra0/GetCmdID_mac.zip?dl=0
(note that I've enclosed the Prompt version with parentheses, remove them if you want to use this version)
Copy link to clipboard
Copied
David, can you please update in future the list of code with this small update?
Layer Styles -> Remove All 3744 (instead of 2072)
Thanks!
Copy link to clipboard
Copied
Hi everyone,
seems the link was broken, so here's a new link to the Windows version:
https://www.dropbox.com/s/vwfihacjlcvo8c7/CMD_AEGP.aex?dl=0
Enjoy!
François


-
- 1
- 2