AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sat May 18, 2013 7:42 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Wed Jan 09, 2008 3:37 am 
Offline

Joined: Fri Nov 30, 2007 8:46 am
Posts: 15
Hi,

Regarding app.executeCommand(...) & app.findMenuCommandId:

Anyone got a complete list of these commands?

Here is the ones I have found out myself so far, I figured people would appreciate such a list. You can use these by typing:

app.executeCommand(..commandID..)

or even better:

app.executeCommand(app.findMenuCommandId("Close"));

..in case these numbers would change (thanks Chris for pointing this out)

Use the numbers after the // below:

alert(app.findMenuCommandId("New Project")); // 2
alert(app.findMenuCommandId("New Folder")); // 2139
alert(app.findMenuCommandId("Close")); // 4
alert(app.findMenuCommandId("Reduce Project")); // 2735
alert(app.findMenuCommandId("Copy")); // 19
alert(app.findMenuCommandId("Paste")); // 20
alert(app.findMenuCommandId("Image Caches")); // 2372
alert(app.findMenuCommandId("New Composition...")); // 2000

alert(app.findMenuCommandId("Text")); // 7016
alert(app.findMenuCommandId("Solid...")); // 3001
alert(app.findMenuCommandId("Light...")); // 2563
alert(app.findMenuCommandId("Camera...")); // 2564
alert(app.findMenuCommandId("Null Object")); // 2767
alert(app.findMenuCommandId("Shape Layer")); // 3736
alert(app.findMenuCommandId("New Mask")); // 2367

alert(app.findMenuCommandId("Glow")); // -3014668 ?

alert(app.findMenuCommandId("Full")); // 2048
alert(app.findMenuCommandId("Half")); // 2047
alert(app.findMenuCommandId("Third")); // 2081
alert(app.findMenuCommandId("Quarter")); // 2046

alert(app.findMenuCommandId("Show Rulers")); // 2280
alert(app.findMenuCommandId("After Effects Help...")); // 2542

Regards,

_________________
Freelance CG Artist
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com


Last edited by sundstedt on Wed Jan 09, 2008 6:47 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 09, 2008 6:37 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 5:55 am
Posts: 157
Location: United States, Ohio
What version of AE do these commands work with?

Is this CS3 only?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 09, 2008 6:48 am 
Offline

Joined: Fri Nov 30, 2007 8:46 am
Posts: 15
Good point Atomic, I have only been using CS3 lately, so these are only tested in CS3. I checked in AE 6.5 for you now and that wasn't supported.
My colleague says it works in 7.0!

_________________
Freelance CG Artist
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com


Last edited by sundstedt on Thu Jan 10, 2008 2:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 10, 2008 2:38 am 
Offline
User avatar

Joined: Thu Jul 15, 2004 1:03 am
Posts: 21
Location: Russia, Kazan
Code:
File New 2264
Open Project 3
Open Recent Projects 2284
Browse... 3689
Browse Template Projects... 3692
Clos 4
Close Project 3154
Save 5
Save As... 6
Save a Copy... 2166
Increment and Save 3088
Revert 7
Import 2105
Import Recent Footage 2283
Export 2494
Find... 2607
Find Next 2608
Add Footage to Comp 2005
New Comp from Selection... 2796
Consolidate All Footage 2107
Remove Unused Footage 2109
Reduce Project 2735
Collect Files... 2482
Watch Folder... 2457
Create Proxy 2777
Set Proxy 2106
Interpret Footage 2102
Replace Footage 2237
Reload Footage 2257
Reveal in Explorer 2562
Reveal in Bridge 3690
Project Settings... 2611
Page Setup... 8
Print... 9
Quit 1

Edit
Undo 16
Redo 2035
History 2995
Cut 18
Copy 19
Copy Expression Only 53
Paste 20
Clear 21
Duplicate 2080
Split Layer 2158
Lift Work Area 2613
Extract Work Area 2614
Select All 23
Deselect All 2004

Label 2358
Purge 2370
Edit Original... 2142
Edit in Adobe Audition 3697
Edit in Adobe Sound booth 3761
Templates 2265
Preferences 2079

Layer New 2606
Layer Settings 2021
Open Layer 2015
Open So urce Window 2523
Mask 2040
Mask and Shape Path 3745
Quality 2041
Switches 2053
Transform 2020
Time 3155
Frame Blending 2289
3D Layer 2541
Guide Layer 3081
Add Marker 2157
Preserve Transparency 2190
Blen ding Mode 2162
Next Blending Mode 2781
Previous Blending Mode 2782
Track Matte 2269
Layer Styles 3739
Bring to Front 2016
Bring Forward 2018
Send Backward 2019
Send to Back 2017
Adobe Encore 3082
Create Outlines 2933
Auto-trace... 3044
Pre-compose... 2071

Composition
New Composition... 2000
Composition Settings... 2007
Background Color... 2036
Set Poster Time 2012
Trim Comp to Work Area 2360
Crop Comp to Region of Interest 2997
Add to Render Queue 2161
Add Output Module 2154
Preview 2131
Save Frame As 2233
Make Movie... 2006
Pre-render... 2780
Save RAM Preview... 2125
Comp Flowchart View 2258

Layer
New 2606
Layer Settings... 2021
Open Layer 2015
Open Source Window 2523
Mask 2040
Mask and Shape Path 3745
Quality 2041
Switches 2053
Transform 2020
Time 3155
Frame Blending 2289
3D Layer 2541
Guide Layer 3081
Add Marker 2157
Preserve Transparency 2190
Blen ding Mode 2162
Next Blending Mode 2781
Previous Blending Mode 2782
Track Matte 2269
Layer Styles 3739
Bring to Front 2016
Bring Forward 2018
Send Backward 2019
Send to Back 2017
Adobe Encore 3082
Create Outlines 2933
Auto-trace... 3044
Pre-compose... 2071

View
New Viewer 2039
Zoom In 2092
Zoom Out 2093
Resolution 2037
Use Display Color Management 3704
Simulate Output 3703
Show Rulers 2280
Show Guides 2274
Snap to Guides 2286
Lock Guides 2275
Clear Guides 2276
Show Grid 2277
Snap to Grid 2278
View Options... 2776
Show Layer Controls 2435
Reset 3D View 2642
Switch 3D View 2625
Assign 3D View Shortcut 2624
Switch to Last 3D View 2703
Look at Selected Layers 2834
Look at All Layers 2835
Goto Time... 2076


Effect
Effect Controls 2163
Last Effect 2452
Remove All 2072

Window
Work space 2738
Assign Workspace Shortcut 3707


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 10, 2008 2:43 am 
Offline

Joined: Fri Nov 30, 2007 8:46 am
Posts: 15
Thanks monter for providing a much longer list.

_________________
Freelance CG Artist
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 10, 2008 11:58 pm 
Offline
User avatar

Joined: Thu Jul 15, 2004 1:03 am
Posts: 21
Location: Russia, Kazan
All Codes can be looked here:
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 11, 2008 11:48 am 
Offline
Enhancement master
User avatar

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
keep in mind that some codes changed from 7 to CS3 so I would make sure your script checks which version it's running on before it fires off it's commands..

-Lloyd

_________________
http://aescripts.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 10:12 am 
Offline

Joined: Fri Nov 30, 2007 8:46 am
Posts: 15
lloydalvarez wrote:
keep in mind that some codes changed from 7 to CS3 so I would make sure your script checks which version it's running on before it fires off it's commands..

-Lloyd


That's no problem LLoyd, I know a way around this problem (suggested to me by my friend Chris B).

Just type this:

Code:
app.executeCommand(app.findMenuCommandId("Close"));


(this is an example, exchange "Close" to your intended menu command):

This way it will not matter if the ID number has changed, while you will need to know what the name of the menu command is (which can be read from the menus manually). Actually using this method we don't ever have to worry about the ID number of the commands in the first place :D

_________________
Freelance CG Artist
Website: http://www.sundstedt.se
AEScript Blog: http://aescripts.blogspot.com/
CG Blog: http://www.sundstedt.blogspot.com


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Sun Jun 15, 2008 9:42 pm 
Offline

Joined: Sat Jun 14, 2008 9:22 pm
Posts: 11
Location: South Carolina
Does anyone know why when I use the following code (to invoke the "File|Export|Quicktime Movie..." command):
Code:
app.executeCommand(app.findMenuCommandId("Quicktime Movie..."));
I don't get any result?

All of the other File|Export commands can be called. Such as
Code:
app.executeCommand(app.findMenuCommandId("MPEG-4..."));


I did try
Code:
alert(app.findMenuCommandId("Quicktime Movie..."));
and the alert window just said "0", (that's a zero).

I'm creating a custom dockable UI for my editors at work and was hoping to be able to call the
Code:
app.executeCommand(app.findMenuCommandId("Quicktime Movie..."));
string inside a simple function. A button would execute the function with an onClick.

Long story, short, I'm having to go through the Export menu because the AE Output Module for Quicktime MPEG-4 movies (not H.264) doesn't give me an "MPEG-4 Audio" (AAC) option. Only through the File|Export|Quicktime Movie... does it give me the "MPEG-4 Audio" audio option.
The resulting rendered file must be a MPEG-4 Video file, with Mpeg-4 Audio, and with a .mov extension, not .mp4. The .mov format and spec requirements are not of my choice but of our clients choice.

I am using Windows not OSX btw.

Awesome site! I've learned alot!
If this needs to go into it's own thread please let me know as this is my first post.

Any help is appreciated!


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Thu Jun 26, 2008 2:00 pm 
Offline

Joined: Wed Jul 07, 2004 2:30 pm
Posts: 319
Location: Charlotte, NC
Does anyone know the command for "Save frame as... Photoshop layers"?

_________________
Byron Nash
CG/VFX Generalist
http://www.editatjoes.com
http://www.armoredsquirrel.com


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Tue Jul 01, 2008 8:38 pm 
Offline

Joined: Sat Jun 14, 2008 9:22 pm
Posts: 11
Location: South Carolina
I just tried the
Code:
alert(app.findMenuCommandId("Save frame as..."));


and it gave me 0 (zero) as the resultant in the alert.

Sounds like the same problem as I have above with the "Quicktime Movie..." command. Some commands I guess just aren't directly accessible in scripting currently.


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Tue Jul 01, 2008 10:56 pm 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 645
Location: London, UK
I tried this on AE CS3:
Code:
alert(app.findMenuCommandId("Photoshop Layers..."));

....and it returned 5001. So then I tried these:
Code:
app.executeCommand(5001);
app.executeCommand(app.findMenuCommandId("Photoshop Layers..."));

Either of them will bring up the "Save Layered File As" save window, but I'm not sure if it's possible to get the script to control this save window.


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Wed Jul 02, 2008 6:44 am 
Offline
Enhancement master
User avatar

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
Last year I wrote a script to batch save frames as photoshop layers, here's that script:

http://aescripts.com/scripts/SaveFrames ... rs.jsx.zip

problem is, as Paul pointed out, the save dialog box is not controllable so you need to either hit OK but hand or have some sort of system key macro or script acknowledging the save dialog box..

-Lloyd

_________________
http://aescripts.com


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Wed Jul 02, 2008 7:44 am 
Offline

Joined: Wed Jul 07, 2004 2:30 pm
Posts: 319
Location: Charlotte, NC
Thanks for the help guys. I ran into a related problem now though. The comp I would like to save as photoshop is created by duplicating an existing comp. I don't think there will be a way to set the activeItem in scripting right?

_________________
Byron Nash
CG/VFX Generalist
http://www.editatjoes.com
http://www.armoredsquirrel.com


Top
 Profile  
 
 Post subject: Re: app.executeCommand(...) List - work in progress (for CS3)
PostPosted: Wed Jul 02, 2008 7:49 am 
Offline
Enhancement master
User avatar

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
You don't need to, you can refer to your new comp by setting it up as a variable.. check out my magnum script for reference.. I create a temporary comp that I do all my work in and then delete it when I'm done.. the script is pretty well commented so hopefully it should be easy to follow..

-lloyd

_________________
http://aescripts.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group