Skip to main content
Participant
August 2, 2016
Question

How to get focus on a panel?

  • August 2, 2016
  • 1 reply
  • 1021 views

Hello,

In After Effects I have written a panel that (among other things) switches between different compositions using Extendscript.

I use the myComp.openInViewer() function to switch between compositions.

A side effect of this function is that the viewer becomes active. This means that you first have to click on my custom panel before the user can click on the next action. This is a bit of a hassle, because the point of my script is to quickly compare compositions and a few extra click defeat the whole purpose.

Is there a way to put the focus back on my panel via a Extendscript command (or something else)?

I use After Effects CC 2014 on a pc. The panel is written in html5 and thus uses a lot of embedded JavaScripts. Through these scripts I call the .jsx-files.

Hope there is a solution.

Thanks,

Geert

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
August 3, 2016

I guess there is no clean solution for this.

As a workaround, maybe you can execute this command twice:

app.executeCommand(app.findMenuCommandId("my tool name"));

where you need to replace "my tool name" by the name of your panel as shown in the window->extension menu.

The first time you execute it, it should close your panel (assuming it is open) and the second time it should open it again (which also gives it focus).

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects