Context detection in AE scripting

Discussion created by Michael_Lowry on Jul 17, 2018
Latest reply on Aug 6, 2018 by PhilippElmer

I recently came up with a way to determine from an AE scripting JOBI or SCRI, whether the scripting statements are being run in the pre-process or process, or the post-process.



:SET &DebugMode# = &DebugMode#
:IF &Task_Status# < 1573
:  SET &Active_Tab# = "pre-process or process"
:  SET &Active_Tab# = "post-process"
:IF &DebugMode# = "YES"
:  PRINT "Active tab : &Active_Tab#"


I have started to think of other areas where it could be useful to determine the context within which a script is running.

Context questionAnswer found by
1. If the task is running as a child task in a schedule or workflow, what are the details of the parent task?Predefined variables, e.g.,


2. Is the task a rerun?&$RESTARTED#
3. If the task was started by another task, what are the details of the calling task?

Predefined read buffer variables, e.g,


4. If the task was started by an EXEC VARA, which one??
5. If the task was started by an EXEC VARA used in a prompt set:
  • Which prompt set?
  • Which variable?
  • Is the EXEC VARA used in the data source or the default value?


Can anyone think of ways to obtain this information?