-- Stop and restart TiVo Desktop (starts it if it's not already running)
tell application "System Preferences"
set current pane to pane "TiVo Desktop"
tell application "System Events" to tell process "System Preferences"
if exists button "Stop" of window "TiVo Desktop" then
click button "Stop" of window "TiVo Desktop"
end if
delay 2
if exists button "Start" of window "TiVo Desktop" then
click button "Start" of window "TiVo Desktop"
end if
end tell
quit
end tell