Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Five Fun Ways to Play with Audio Hijack Pro
Subject:   Audio Hijack timeshifting
Date:   2005-12-02 17:14:28
From:   william_s_edwards
I had some problems with the AudioHijack plugins that start AH and cause external apps like iTunes to quit. I worked around my problems by using crontab, the open command and a shell script so that I could time-shift a radio news program from an MP3 stream.


Here are my crontab entries that quit out of iTunes (necessary for AH to hijack it), and start AH:


57 16 * * 1-5 /Users/wse/bin/appquit iTunes
58 16 * * 1-5 open /Applications/'Audio Hijack Pro'.app


cron runs these commands every weekday at 4:57 PM and 4:58 PM, respectively. I put these entries into a file called .crontab in my home directory, and ran:


crontab .crontab


to install them.


appquit is a little shell/Applescript:


#!/bin/csh -f


foreach i ($argv)
osascript < tell application "$i"
activate
quit
end tell
SCHLUSS
end


(SCHLUSS means "end" in German :-)). The only failure points with this setup have been if iTunes cannot play the stream I am hijacking, or if I have set iTunes to stream to an Airtunes speaker that does not exist on the network (I am running this from my Powerbook).


I hope this is helpful--Audio Hijack really is a great program.


Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Audio Hijack timeshifting (3rd attempt)
    2005-12-02 17:21:34  william_s_edwards [View]

    I am really sorry--the appquit script is getting eaten. The core of it is the following very simple Applescript:

    tell application "$i"
    activate
    quit
    end tell

    enclosed in a shell here document. The double angle brackets in the here document are being eaten by this messager.
    • An alternative - appswitch
      2005-12-04 18:36:30  nriley [View]

      If you don't want the overhead of osascript/AppleScript, you can also quit applications with my appswitch tool.

      http://web.sabi.net/nriley/software/#appscript
      • An alternative - appswitch
        2005-12-04 18:37:05  nriley [View]

        Obviously I meant "appswitch" in the URL above (not appscript, which is also cool but is totally different :-)