Troubleshooting Event Scripts
Use the following suggestions to help you troubleshoot your event scripts if they do not execute as expected.
- Open the templater.log file and search the text file for the phrases
EVENT SCRIPT ERROR
, EXEC SHELL SCRIPT
, or the string used in the first parameter of the $D.log.msg()
method.
- Locate the log line that shows a statement starting with "Full command line...", highlight only the full command line as reported by Templater, and copy it to the clipboard.
- Start a new command line session and paste the full command line at the prompt. Press Enter.
- Verify that your script executes as expected.
- Inside your script file, log output messages to a text file. The code to log to a file differs depending on the language you are writing your script in. For example consider the following code for various scripting languages:
- Logging to file debug.txt on the user's desktop in a Bash script on macOS:
printf "Troubleshooting my event script" >> ~/Desktop/debug.txt
- Logging to file debug.txt on the user's desktop in a Batch Script on Windows:
echo Troubleshooting my event script >> %USERPROFILE%\Desktop\debug.txt
- Logging to Templater's own templater.log file in ExtendScript:
$D.log.msg('EVENT SCRIPT DEBUG', "Troubleshooting my event script");
- After Templater finishes its tasks, inspect the log file to see if your script generated expected results.
- Verify that the script file is executable by the user running After Effects.
-
If the user does not have permission to execute the script file, a user with administrator privileges should set them for the script file. For example, on OSX, you can enter chmod u+x myPostJob.sh
to make it executable for the current user. On Windows, use the Security tab in the script file's Properties dialog.