Hedge
  • Welcome 👋
  • Arctic
    • Requirements
    • Upgrades
    • Releases
    • Questions
    • Need help?
  • Canister
    • Installation
      • macOS
      • Windows
    • Tape Media
    • Features
      • Formatting
      • Archiving
      • Spanning
      • Retrieving
      • Queuing
      • Catalogs
      • Tape Library Manager
      • Connect
      • Logs & Manifests
    • Licensing
    • Firmware
    • Releases
    • Requirements
    • Troubleshooting
    • Questions
    • Beta Track
    • Need help?
  • Connect
  • EditReady
    • Installing
    • Supported Formats
    • Getting Started
    • Previewing Files
    • Metadata
    • Converting Media
      • Additional Features
      • Custom Presets
      • Trimming Clips
      • Joining Files
      • Naming Your Files
      • Rewrapping
    • Connect
    • Settings
      • General
      • Advanced
    • Automation
    • Upgrades
    • Requirements
    • Releases
    • Questions
      • How can EditReady prep my source media for immediate use in Media Composer?
    • Need help?
  • EditReady Server
    • Releases
  • FoolCat
    • Overview
    • Color Conversion
    • Supported Formats
    • Automation
    • Offload Report Creator
    • Questions
    • Requirements
    • Releases
  • Hedge
    • Releases
    • Moving From Hedge to OffShoot
  • Mimiq
    • Getting Started
    • Bin Locking
    • Workspaces
      • Installing macFUSE
      • StorNext permissions
    • Deployment Options
    • Media Composer & Mojave
    • Requirements
      • Avid's Requirements
    • Releases
    • Troubleshooting
    • Questions
    • Beta Track
    • Need help?
  • OffShoot
    • Features
      • Verification
      • Ingest Browser
      • Labels
      • Elements
      • Organization
      • Duplicate Detection
      • Queuing
      • Stop & Resume
      • Cascading Copies
      • S3 Transfers
        • Configuring Connections
      • Logging
      • Connect
      • Date & Time
      • Floating Licenses
      • Automation
        • Scripting
          • Event Log
          • Events
            • OffShoot Started
            • Disk Added
            • Disk Removed
            • Disk Busy
            • Disk Idle
            • Disks Idle
            • Transfers Added
            • File Copy Completed
            • Verification Issue
        • API
        • OffShoot Helper
          • Set Window Layout
        • Example Scripts
          • Transfer Reports
          • Move Transfer Logs
          • Move Foolcat PFD reports
          • Auto-set Destinations
          • Auto-set Preferences
          • Automated Transfers
          • Delete MHL files
          • Slack Notifications
          • Send Email Notifications
          • ZCAM video stitcher
          • Cascading copy
          • Watch Folder
          • Set Finder Tags
    • Integrations
      • Codex
      • EditReady
      • Finder & Explorer
      • FoolCat
      • Frame.io
      • iconik
      • ParaShoot
      • ProGrade
      • Scratch
    • Requirements
    • Releases
    • Questions
    • Need help?
    • Beta Track
    • Solo
  • PostLab
    • Getting Started
    • Supported Apps
    • Supported Storage
    • Features
      • Team Bundles
      • Collections
      • Versioning
    • Requirements
    • Releases
    • Troubleshooting
    • Questions
    • Need help?
    • Beta Track
  • ScopeBox
    • Installing
    • Application Overview
    • Sources
    • ScopeLink
      • Installation and Configuration
      • Troubleshooting
    • Palette Overview
    • Palette Types
      • Audio Meters
      • Channel Plot
      • CIE Plot
      • HML Balance
      • Luma and RGB TimeTrace
      • Luma Histogram
      • Preview
      • RGB Histogram
      • RGB Parade
      • Surround Meters
      • Timecode
      • Vectorscope
      • Waveform
      • YCbCr Parade
    • Stills and Targets
    • Layouts
    • Licensing
    • Upgrades
    • Releases
    • Questions
  • General
    • Downloads
    • Trials
    • Demo Mode
    • Purchasing
      • Students and Non Profits
      • Quotes, POs, and Invoices
      • Refunds
      • Professional Services
    • Licenses
      • The License Manager
      • License Types
      • Local License Server
      • Activating
      • Deactivating
      • Extending
      • Merging
      • OS Updates
      • Licensee Changes
      • VMs & Hypervisors
      • Root Certificates
      • Network Adapters
      • Network Requirements
      • Questions
    • Hedge Funds
    • Certifications
    • Policies
      • Sharing Files
    • Company Details
      • Terms & Conditions
      • Privacy Policy
      • EULA
    • Press
  • Need help?
Powered by GitBook
On this page
  • Getting started
  • Scripting on Windows
  • Good to know
Export as PDF
  1. OffShoot
  2. Features
  3. Automation

Scripting

Last updated 25 days ago

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

This feature requires an OffShoot Pro license.

Getting started

OffShoot's Scripting feature on macOS accepts only AppleScript. It is of course possible to run other scripts written in other languages by using an intermediate script.

On Windows? Check the .

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 has its own set of unique parameters that you can use. To be able to use a parameter, you must first declare it at the top of your script:

set theFolder to "{FileCopyCompleted_destinationPath}"

Do you want to check if you declared a parameter correctly? Return the value first in one of three ways:

  • return theFolder to output into the Event Log

  • display alert "theFolder = " & theFolder

  • display notification with title "theFolder =" subtitle theFolder

When you download a script from this site or other sources, unpack the zip. Then open OffShoot, go to Settings > Scripting, and select the event you want to add a script to. Click the Browse... button and find your script. From now on, OffShoot will attempt to run this script every time this event occurs.

If for some reason, the script no longer exists in the original location, OffShoot will not warn you about it.

Scripting on Windows

AppleScript is not possible on Windows, but Python is.

On Hedge 22.2.5 or older? Add a script via a Registry key: Computer\HKEY_CURRENT_USER\Software\Hedge

Key

Value

EventScriptDiskAdded

path to the script file

EventScriptDiskRemoved

path to the script file

EventScriptDiskBusy

path to the script file

EventScriptDiskIdle

path to the script file

EventScriptAllDisksIdle

path to the script file

EventScriptFileCopyCompleted

path to the script file

EventScriptCheckpointIssue

path to the script file

When your script does not get fired, check the hedge.log file located in C:\Users\<your-user-name>\AppData\Roaming\Hedge for clues. The most common issue is that a script launcher is not found: ERROR Utilities.Python.PythonHelper - Required PyLauncher for running python scripts was not found in the registry at location 'HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Python\PyLauncher'

Try (Re)installing Python with the official installer and make sure to enable Use admin privileges.

Example python script

import json
import argparse

# get arguments
parser = argparse.ArgumentParser()
parser.add_argument("jsonString", nargs='?', default="This script should be used with OffShoot, see: https://docs.hedge.video/hedge/features/automation/scripts")
args = parser.parse_args()

jsonString = str(args.jsonString.replace("\\\\", "/")) # normalize \\ paths to / 
jsonString = jsonString.replace("\\", "/")  # normalize \ paths to /

logFilePath = "C:\\temp\\log.txt"
f = open(logFilePath, "w")
f.write(jsonString)
f.close()

# initialize JSON object to do some interesting stuff
jsonObject = json.loads(jsonString)

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 .

Scripting on Windows section
OffShoot Started
Disk Added
Disk Removed
Disk Busy
Disk Idle
Disks Idle
Transfers Added
File Copy Completed
Verification Issue
Event Log