(* Remote RadioShark Station Selector Script Applet by Diggory Lay*censored* - http://www.monkeyfood.com (ha - Geeklog censors my name!) *** N.B. - You must replace the TWO instances of the remote machine address - eppc://cube.local. - with the address of your machine that the radioshark is attached to - I wish this could be set as a property, but Script Editor doesn't seem to like this. *** *) property StationSelectionDialogTitle : "Select a Station" property growlRegistrationName : "Remote RadioShark Station Selector" property GrowlNotificationName : "Station Tuned" -- Get all Stations tell application "radioShark" of machine "eppc://cube.local." set currentlyTunedFrequency to frequency set stationNamesList to {} set allStations to every station repeat with thisStation in allStations tell thisStation set thisStationName to description copy thisStationName to end of stationNamesList if id is equal to currentlyTunedFrequency then set currentlyTunedStationName to thisStationName end if end tell end repeat end tell -- Ask user to choose Station if currentlyTunedStationName is not false then set chosenStationName to choose from list stationNamesList with title StationSelectionDialogTitle default items currentlyTunedStationName else set chosenStationName to choose from list stationNamesList with title StationSelectionDialogTitle default items 0 end if set chosenStationName to item 1 of chosenStationName -- Tune Station if chosenStationName is not false then tell application "radioShark" of machine "eppc://cube.local." set allStations to every station repeat with thisStation in allStations if description of thisStation is equal to chosenStationName then set selectedStationFrequency to id of thisStation exit repeat end if end repeat set stationToTune to station id selectedStationFrequency tune stationToTune end tell end if -- Notify tuning using Growl tell application "GrowlHelperApp" set myAllNotesList to {"Station Tuned"} register as application growlRegistrationName all notifications myAllNotesList default notifications {GrowlNotificationName} icon of application "RadioSHARK" notify with name GrowlNotificationName title chosenStationName description ("Switching to " & chosenStationName) application name growlRegistrationName end tell