Repository of scripts for extending Hedge on the Mac.
Use at your own discretion. Don’t be foolish, test before using a script in production. Scripting is a very powerful feature, it can be potentially destructive. Do not use it unless you really know what you can and can't do with scripts. The Sync Factory, creator of Hedge, does not assume responsibility for problems with or due to these scripts. The Sync Factory reserves the right not to offer support for these scripts.
Hedge defines 5 events:
- DiskAdded
- DiskBusy
- FileCopyCompleted
- DiskIdle
- DiskRemoved
Mar 22, 2016 Hedge for Mac, a new transfer management software was released today. I had a chance to review it and also compare to existing other solutions on the market. Let’s be frank, dealing with data isn’t the sexiest thing to talk about, and most people do drag-and-drop transfers of their footage in. It's a blast! Version 1.0.0 Beta 1 is out! A couple of players were kind enough to send us bug reports, complaints and small suggestions while playtesting the previous version.
Each event has its own set of unique parameters that you can use.
Folders and Files in AppleScript
We're used to seeing paths delimited like URLs, with /. In Applescript though, paths are delimited with the colon (:) which is called POSIX. Hedge outputs URLs, so you'll need to convert to POSIX. Luckily, that's easy to do:
property theFolder : '{destinationPath}'
tell application 'Finder'open (theFolder as POSIX file)end tell
If you want to refer to your home folder, you can't just use
~
. Instead, you need to insert the home folder path like this:tell application 'Finder'open (POSIX path of (path to home folder)) as POSIX pathend tell
Good-to-knows
- 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.
Security
We added an extra layer of security: paths are event-specific, and include the event name. This way you can’t accidentally use your “Erase Source”-script to erase a Destination.
DiskAdded
Fires when a new disk is mounted. Pretty self-explanatory.
DiskAdded_title Disk ADiskAdded_rootFilePath /Volumes/Disk ADiskAdded_diskSize 249779191801DiskAdded_availableDiskSpace 61058125824DiskAdded_protocolName USBDiskAdded_mountedAt 20161125113059
Other bus protocolNames include Firewire, Secure Digital, iSCSI, SAS, afpfs, nfs, PCI, SATA and more. Disks connected through a USB hub all show up as USB drives, so you can't discern between true USB disks or Compact Flash media. A way around this is to check for diskSize.
Hedge Mac Software
DiskBusy
Fires when a transfer starts. A disk is either being imported, or being imported to. When Disk A is imported to Disk B and Disk C, three DiskBusy events fire.
DiskBusy_diskType Source or DestinationDiskBusy_rootFilePath /Volumes/Disk ADiskBusy_title Disk A
FileCopyCompleted
Fires when a single transfer is done, e.g. Disk A has been copied to Disk B. The transfer to Disk C might still be running!
FileCopyCompleted_sourcePath /Volumes/Disk AFileCopyCompleted_destinationPath /Users/Hedge/Documents/Footage/Project-001FileCopyCompleted_bytesCopied 16582836224FileCopyCompleted_duration 693.357678FileCopyCompleted_startedAt 20160129144109FileCopyCompleted_verified YES or NOFileCopyCompleted_state Success
There are four possible states when a transfer finishes:
Hedge For Mac Tutorial
- Success: all went well
- Failed: a file transfer failed
- Warnings: verification of a copied file failed
- Cancelled: the transfer was cancelled by the user
DiskIdle
Fires when a disk is done with whatever job it was doing.
DiskIdle_title Disk ADiskIdle_diskType Source or DestinationDiskIdle_hasFailedTransfers YES or NODiskIdle_rootFilePath /Volumes/Disk A
![Mac Mac](/uploads/1/3/3/9/133915258/715186346.png)
DiskRemoved
Fires when a disk is removed from the system. Maybe it was ejected in Hedge, or in Finder, or simply removed manually.
DiskRemoved_title Disk ADiskRemoved_rootFilePath /Volumes/Disk ADiskRemoved_unmountedAt 20160129144109
Hedge For Mac Reviews
Questions? You can always reach us at [email protected] or @hedgeforvideo on Twitter.