i'm new, but have a few questions...

i just ordered a few books on applescript, but in the meantime, i am trying to write aquick script to do the following:
start up audiohijack
open the cartalk radio website to the ‘this weeks’ show
start the show
start audiohijack recording the show
my problem is this:
i’ve got everything opened, and the setting remain the same on audiohijack,
but how can i control audio hijack?
i need to press command-n (new recoding) then command-r (start recording)
that’s all
that’s really left, but i’m not sure the commands for this.
can anyone help with some pointers? thanks!!!

You’re likely going to need to employ GUI Scripting to control Audio Hijack, since I doubt it’s scriptable.


thanks for the reply.
i’m very new to this, and was just messing aroound with scripts while i wait for my books.
GUI interface looks like something I can’t get my hands on for free, right?
If that’s the case, it’s far too much trouble than it’s worth, and I’ll script other things to helpin the process.
Thanks for the help.

No, no, no.
GUI Scripting is free. Read the documentation. It’s built-in.

No, using the link TJ provided above, there is another link to download the GUI scripting software (although it is currently beta it runs just fine for me and many others). When you drag the audiohijack application icon onto the Script Editor icon, does a script dictionary open up?


sorry guys.
i see it and i did it.
i haven’t tried to drag it though, and just started borrowing lines of code from the examples on the link above.
i’ve got a “do_menu” command, actually, 3 in a row.
is there a way to separate them, as i’m getting the error telling me “the do_menu handler is specified more than once”
and it is. but i’m not sure how to fix it…
the sample looks like this:
– Audio Hijack Pro, Control, Start Hijacking

if my do_menu(“Finder”, “Finder”, “Hide Others”) is false then error number -128
if my do_menu(“Finder”, “View”, “Clean Up”) is false then error number -128

on do_menu(app_name, menu_name, menu_item)
– bring the target application to the front
tell application app_name
end tell
tell application “System Events”
with timeout of 300 seconds – 5 minutes
tell process app_name
tell menu bar 1
click menu item menu_item of menu menu_name
end tell
end tell
end timeout
end tell
return true
on error error_message
return false
end try
end do_menu

but then i need to end two more menu commands…
thanks again for the help.