FrogRadio
Algorithm Free Radio.
Real DJs and Handcrafted Streams.



Scripting
Starting with version 1.6.0 for macOS you can write scripts to control FrogRadio. Scripting is available only in the direct download version of FrogRadio! Not in the Mac App Store version.

To create a FrogRadio script use your favorite text editor to edit a plain text file. Below are listed the commands you may use to control FrogRadio. From the FrogRadio File Menu select Run Script then Open Scripts Folder. Save your script in this folder with the file extension of .js. You can use basic javascript code in your script file. To run your script: select the script name from the Run Scripts menu. When a script is running the name of the script will be show in the FrogRadio title bar. To stop a running script press the main radio Stop button.

Commands
playStation("Folder","Station Name") - Play the named station from the named folder: playStation("Featured:Indie","KEXP")

play() - Play the currently selected station.

pause() - Pause playing.

stop() - Stop playing.

prevStation() - Select and play the previous station in the current folder.

nextStation() - Select and play the next station in the current folder.

sleepInMinutes(minutes) - Stop playing in the given minutes: sleepInMinutes(.5) or sleepInMinutes(30)

waitUntilTime("hh:mm:ss") - Wait until the given time: waitUntilTime("7:30:00 am") or waitUntilTime("14:45:00")

volume(volume) - Set volume to given volume, between 0.0 and 1.0: volume(.5)

volumeMove(To Volume, Increment) - Move the volume to the give volume in the given volume increments: volumeMove(.9,.1)

waitMillis(milli seconds) - Wait for the given milliseconds: waitMillis(1000) // wait one second

Examples
//
// Play a favorite station until 8:00 am
// then switch to news, adjusting volume.
//
volume(.3)
playStation("Favorites","Chill Music")
waitUntilTime("8:00 am")
volume(.6)
playStation("Public Radio:WA","KUOW")



//
// Play a favorite station
// then stop playing in 30 minutes.
//
playStation("Favorites","Chill Music")
sleepInMinutes(30)



//
// Play a favorite station
// then in 30 minutes lower the volume
// to zero then stop playing.
//
playStation("Favorites","Chill Music")
waitMillis(1000 * 60 * 30)
volumeMove(0.0,.1)
stop()