Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pause_itunes()
tell application "EyeTV"
  if (full screen) then -- Turn off.
    exit full screen -- EyeTV has a bug with "close windows" from full screen.
    close windows
  else -- 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.
    delay 1.5
    play
    enter full screen
  end if
end tell

-- Pause iTunes, but don't start the app if not already running.
on pause_itunes()
  tell application "System Events"
    if (name of processes) contains "iTunes" then
      tell application "iTunes" to pause
    end if
  end tell
end pause_itunes