Example Scripts

Here are some example scripts to perform some common operations. If you have written some scripts which you would like to share with others, please send them to us.

Tell iRecordMusic to connect to a web page

tell application "iRecordMusic"
	connect to "http://www.google.com"
end tell

Connect to BBC Radio 1 and Record and Stop

-- This requires you to have RealPlayer installed
-- This assumes you have one copy of iRecordMusic running
tell application "iRecordMusic"
	set irmID to get irmID
	connect to "http://www.bbc.co.uk/radio/aod/radio1.shtml?listen" with irmID
	display dialog "The web page is loading, and audio should start playing shortly.  Press OK to start recording"
	start recording showname "Radio 1 Show" broadcastername "BBC" djname "Unknown DJ" with irmID
	display dialog "Press OK to stop recording"
	stop recording with irmID
	tell document 1
		close
	end tell
end tell

Schedule Recording of BBC Radio 1 for 5 minutes

-- This requires you to have RealPlayer installed
-- This assumes you have one copy of iRecordMusic running
-- Note, if the page takes a long time to load, the recording may be aborted if there is no audio after X seconds.  This can be tweaked in the preferences.
tell application "iRecordMusic"
	set irmID to get irmID
	connect to "http://www.bbc.co.uk/radio/aod/radio1.shtml?listen" with irmID
	set startDate to current date
	set endDate to startDate + 5 * minutes
	schedule recording from startDate to endDate closewindow yes showname "Radio 1 Show" broadcastername "BBC" djname "Unknown DJ" with irmID
	tell me
		display dialog "The Script has set up a recording.  Goodbye!"
	end tell
end tell