Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Possible to press button of jsx.bin Script UI from WITHIN another script?

  • Possible to press button of jsx.bin Script UI from WITHIN another script?

    Posted by Sami Bayley on February 17, 2022 at 9:11 am

    TLDR;
    Script UI needs me to select only ONE layer then hit the button, then select another, hit the button. Can’t do multiple layers at a time. Can I write a script that includes a “button press” of another script UI panel?

    Two questions in one really.

    I’m trying to automate part of my text highlighting animation process. Currently halfway there, and I’ve found a nifty script on AE scripts that does exactly what I want, Animated Text Block (resizes text on line to text on line above, its just text in a square).

    The problem is, I can’t just highlight all text layers and hit the button in the script UI panel. It gives me an error saying “select a text layer”. So I have to manually go through all text layers, selecting them, hitting the button, select text, hit button, select, button, so on! Really tedious stuff, and the plan is to fully automate this whole process in future. So I need to find; either a replacement solution to the ‘Animated Text Block’ script UI, to something custom that can be applied via a Script. OR, use a script to do the ‘select, button, select button’ job for me.

    Any ideas on if this is possible or not?

    Joel Bellagamba replied 10 months, 1 week ago 3 Members · 4 Replies
  • 4 Replies
  • Tomas Bumbulevičius

    February 17, 2022 at 9:18 am

    Hey Sami, if you are experienced in scripting by some degree, inspect object model of the script UI you are dealing with.

    If it has UI panel buttons defined globally, they can be accessed and triggered by [buttonObject].notify()

  • Sami Bayley

    February 17, 2022 at 9:53 am

    Hmm, not extremely experienced in scripting. I’ve wrote a couple with a decent amount of help – still learning. How would I inspect the object model?

  • Tomas Bumbulevičius

    February 22, 2022 at 11:39 am

    Sami, you need Extendscript debugger – by adding stop break points on the script, you then can inspect what “objects” are in active script and a global variables.

    The button which we are talking about would be in a global app space.

    Check this for how debugging works: https://extendscript.docsforadobe.dev/extendscript-toolkit/debugging-in-the-toolkit.html

  • Joel Bellagamba

    July 2, 2025 at 2:49 pm

    Yes, it’s possible by calling the button’s function from the other cript, if both scripts are in the same context and the UI is accessible.

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