endUndoGroup()

Marks the end of an undo group begun with the app.beginUndoGroup method. You can use this method to place an end to an undo group in the middle of a script,

activeViewer

The Viewer object for the currently focused or active-focused viewer Composition, Layer, or Footage panel.Returns null if no viewers are open.Viewer object;

Application object

Provides access to objects and application settings within the After Effects application. The single global object is always available by its name, app.Attr