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#
:SET &Task_Status# = GET_UC_OBJECT_STATUS()
: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 question||Answer 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?|
UC_CAUSE_NAME & UC_CAUSE_NR
|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:||?|
Can anyone think of ways to obtain this information?