Scripting
OffShoot is built with extensibility in mind. Trigger your custom scripts on specific events, and run custom processes, other apps, or integrate OffShoot into an existing workflow.

Getting started
Scripting is a powerful tool. Easy to learn, but even easier to screw up. Always test your script with disposable data, and then test again. And again.
OffShoot does not offer support or assume responsibility for problems with or due to examples or any other script.
If you’re new to scripting, find someone to help you out, or use the example scripts available here. Remember: you are solely responsible.
The following events are available:
Each event can trigger a script (Python or AppleScript) and has its own set of unique parameters that you can use.
Good to know
Timestamps are shown as
YYYYMMDDHHMMSS.
Duration is in seconds, with six-digit precision.
Size is in bytes. To convert bytes to GBs, divide by 1024^3.
Script Events are logged in OffShoot's Event Log.
Python
OffShoot can trigger a Python script and pass its event parameters as a JSON string argument.
Requirements
macOS
OffShoot for Mac 25.2 and newer
Python 3, accessible via the
python3
command in your system PATH
Windows
OffShoot for Windows 22.2.6 and newer
Python 3 path set in the Registry in
PyLauncher
key, located at:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Python\PyLauncher
Example Script
Use the Python example below to write OffShoot's event parameters to a file in /tmp
AppleScript
To be able to use a parameter, you must first declare it at the top of your script:
set theFolder to "{FileCopyCompleted_destinationPath}"
return theFolder
to output into the Event Logdisplay alert "theFolder = " & theFolder
display notification with title "theFolder =" subtitle theFolder
Last updated