on run tell application "ircle 3.1.2 OS X" -- complain if they didn't give argument if not (exists (argument 1)) then echo serverprefix & " Usage: /vol " echo serverprefix & " Sets the system sound to specified level (0-7)." return end if -- try and change the volume, with error checking and all that try set t_lvl to (argument 1) as integer -- decimal get rounded, actually... if t_lvl is greater than -1 and t_lvl is less than 8 then set volume t_lvl echo serverprefix & " sound level adjusted to " & t_lvl else echo serverprefix & " ERROR: " & t_lvl & " not integer from 0 to 7 inclusive." end if on error msg number num beep echo serverprefix & " ERROR: " & msg & " (" & num & ")." return end try end tell end run