Extending via AppleScripts
In addition to being scripted, Audio Hijack Pro can be extended via "plugin" style AppleScripts. It supports these plugin scripts in three flavors:
(1) Source Target AppleScripts which dynamically generate URLs to be record,
(2) Post-processing AppleScripts which process recording files as they are made
(3) Recording Bin AppleScripts which process recording files after they are made.
Source Target AppleScripts
Source Target AppleScripts can be used when you need to hijack URLs that change often and in predictable ways. They generate a URL string, and return it back to Audio Hijack Pro.
Here is an example Source Target AppleScript that generates URLs like "http://example.com/program-2004-10-03.ram":
set urlString to "http://example.com/program-%Y-%m-%d.ram" set urlString to do shell script "echo -n; date '+" & urlString & "'" return urlString
Post-processing AppleScripts
Post-processing scripts let you process recording files immediately after they are completed. As Audio Hijack Pro finishes a session, it will pass a list of recording files to the "process" subroutine in the given post-processing AppleScript.
The "process" subrountine takes a single arguement, a list of files.
Note that post-processing scripts are invoked batch-style, with all recordings being handed off at once, and not one at a time (as was previously the case in older versions of Audio Hijack Pro).
Here is an example post-processing script that adds files to iTunes library:
on process(theArgs) --Into iTunes ye files shall go tell application "iTunes" repeat with theFile in theArgs add theFile end repeat end tell end process
Recording Bin Applecripts
Recording Bin AppleScripts are almost exactly the same as Post-processing AppleScripts, except they run only when selected manually, and the argument passed to the "process" subroutine is always a list of files. Any correctly written Post-processing script can effectively function as both a Post-processing script and a Recording Bin script.
To have Recording Bin AppleScripts show up in the Recording Bin's script list, place them in: ~/Library/Application Support/Audio Hijack Pro/Recording Bin Scripts.