Thursday, June 18, 2009

More EyeTV related scripting.

Ok, so I spend way too much time with my laptop in my...well, my lap.

I've become a bit dissatisfied with the remote control that comes with EyeTV. But it has some strange lag at times, and things like changing the aspect ratio is under a web of menus.

So, I figured out how to do a litany of things via applescript, which I run through an ssh connection.

Now, for your enjoyment, here's some scripts (as called in SSH, if you're going to copy them into an applescript script, take out the osascript -e ' and the trailing ')

Full Screen:
osascript -e 'tell application "EyeTV" to enter full screen'
osascript -e 'tell application "EyeTV" to exit full screen'

Channel Changing:
Since I've still got the DTV box sitting between the EyeTV and my cable, the remote control is a way better way to change the channel, since this basically doubles the applescript lag.
osascript -e 'tell application "EyeTV" to channel_change channel number 60'
osascript -e 'tell application "EyeTV" to channel_up'
osascript -e 'tell application "EyeTV" to channel_down'

Play/Pause:
osascript -e 'tell application "EyeTV" to pause'
osascript -e 'tell application "EyeTV" to play'

Aspect Ratio:
Even via applescript changing the Aspect Ratio isn't straight forward. There isn't a direct command for it, so what I've been doing is instead telling the computer to pretend it just got the short cut key for the various aspect ratios.
osascript -e 'tell application "System Events" to keystroke "1" using {command down, option down}'
osascript -e 'tell application "System Events" to keystroke "2" using {command down, option down}'
osascript -e 'tell application "System Events" to keystroke "3" using {command down, option down}'

1 comment:

booyaa said...

thanks for these ssh-able eyetv one liners!