Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Release button after being pressed in ScriptUI

  • Release button after being pressed in ScriptUI

    Posted by Vincenzo Imbimbo on September 14, 2022 at 12:38 pm

    Hi guys, i need some help, i have a scripUI with some buttons, the thing is that when i click a button my script works fine but if i press any key in my keyboard it doesn’t work, for example, if i have a layer selected and press “P” to open “position” nothing happens, its like the button on the script stayed pressed, and i need to click “somewhere” in the timeline of AE (or anywehre in the workspace of AE) or click on my layers in order to “release” that button of the scripUI, is there any way to release it in the code? I’m using “.onClick” function.

    Andrei Popa replied 3 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    September 16, 2022 at 8:13 am

    Hi Vincenzo.

    You could try this. It works most of the times. It does not work when panel object is selected or if nothing is selected. If a composition is selected in the panel, it opens that comp (this may be a little annoying at times).

    Paste this as the last like in your .onClick function.


    if (app.project.activeItem) app.project.activeItem.openInViewer();

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy