/* Kill AP radio news on kphx at top and bottom of the hour. */ /* Run with 'rexx killapnews.rex' */ /* This runs on Ubuntu Linux with oorexx installed. */ /* Progressive computing meets progressive radio.. */ normalvolume = 60 /* On a scale of 1 to 100 */ /* Start with some arbitrary volume level. */ 'amixer set Master 'normalvolume'%' call synctime do forever /* Now be wary of top and bottom of the hour. */ now = time() parse var now hh ':' mm ':' ss . say now' watch mm is 'mm' and ss is 'ss if mm = '58' | mm = 28 then do say time()' shut up for 5.0 minutes..' 'amixer set Master 10%' 'sleep 300' 'amixer set Master 'normalvolume'%' call synctime end 'sleep 60' end exit synctime: do forever /* Sort of synchronize with time. */ now = time() parse var now hh ':' mm ':' ss . say now' sync mm is 'mm' and ss is 'ss if ss > '55' then leave 'sleep 1' end return