Effects with Dialog that stop code execution

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Posts: 1
Joined: August 17th, 2017, 6:23 pm

August 17th, 2017, 7:18 pm

Hello Wizards! I'm new to AE scripting, I've immediately found a blocker on what I want to do. The code below adds an effect to a layer. The problem when the script is executed is that some effects have dialog boxes that appear to initially set options to the effect. These options apparently are not visible/accessible to the properties of the effect (no parameters, no setter methods). Because of this, code execution is paused unless user interacts with the dialog i.e press OK or press Return Key. I wish to start a discussion about how this can be resolved :) 

When we execute

Code: Select all

var chickenCount = infoBar.property("Effects").addProperty("ADBE Numbers2");
A dialog appears asking for font, style, direction, and alignment. This can't be accessed from the effect properties and pauses the script.

Stuff I've tried so far:
  • Look for send keys or keystroke in after effects, found none so far.
  • Look for direct interaction to the dialog, nope, none so far.
Possible ugly solutions I'm thinking about:
  • Use external keystroke event, problem is, we won't know when to fire it. If we use network and system interface, it would be way too complicated.
Thanks everybody!
Post Reply