Skip to main content
Participant
April 26, 2023
Question

Set Work Area to Selected Layers with script, command id

  • April 26, 2023
  • 2 replies
  • 508 views

How to "Set Work Area to Selected Layers" with a script? 
app.findMenuCommandId("Set Work Area to Selected Layers") writes 0.
Or if there is no way, how to trim comp to selected layers area. I wanted to set the work area to selected laters and then trim comp to the work area. But if there is no way to do these two things with a script, how to achieve this with short steps?

This topic has been closed for replies.

2 replies

Mathias Moehl
Community Expert
Community Expert
April 27, 2023

Here is an Automation Blocks script to set the workarea to all selected layers:

See this post for more details.

If you want to script it yourself without Automation Blocks, you can use the same logic for your js code.

 

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Community Expert
April 26, 2023

https://hyperbrew.co/blog/after-effects-command-ids/

the command number for trimming the comp to the work are is 2360.

i couldn't find a command number for setting the work area to the selected layers.