This approach could be further generalized too. The SCRI could be designed in such a way that it could be used in many different EXEC VARA objects, and so that these EXEC VARAs could be used in many different places. The SCRI would perform different actions depending on the execution context (which EXEC VARA, which PRPT, etc.).
Already today, I occasionally use EXEC VARAs as pseudo-functions in AE scripting and in prompt sets. However, the called task has no way of determining all the details of the context within which it was called.
Because of this, depending on where the EXEC VARA is used, setting it up may be less than elegant:
- If the EXEC VARA is used in AE scripting, arguments can be passed via script variables in VARA parameters. This actually works quite well.
- If the EXEC VARA is used in {VARA,KEY,COLUMN} references however (e.g., in prompt sets), then either:
- The EXEC VARA must fetch all of the data that might be needed, and the pertinent datum must be referenced by KEY and COLUMN, or
- A separate EXEC VARA must be created for each possible set of arguments.