pause_itunes()tellapplication"EyeTV"if(full screen)then-- Turn off.
exit full screen -- EyeTV has a bug with "close windows" from full screen.
closewindowselse-- Turn on.
activate-- Resume open recording/live window, or open live window.
play
enter full screen
-- If the App wasn't running, this is necessary
-- to get the Live TV Window to open.
delay1.5
play
enter full screen
end ifend tell-- Pause iTunes, but don't start the app if not already running.
onpause_itunes()tellapplication"System Events"if(nameofprocesses)contains"iTunes"thentellapplication"iTunes"to pause
end ifend tellendpause_itunes