launch eyetv and enter full screen

I’m creating a script to launch eyetv with my iphone but the first step is to launch eyetv on my computer.
I just want to turn on the tv, hit command 0 to turn it on to full screen. Something strange happens with this applescript
eyetv launches but they task bar still the applescript toolbar and so the command 0 does not work and then the only way to get out of the script is to force quit eyetv. I thought this would be an easy script.
what am I doing wrong?

tell application "EyeTV"
	delay 3
	tell application "System Events"
		tell process "Terminal"
			keystroke "0" using command down
		end tell
	end tell
end tell

Hi alcatrazp,

I don’t have a lot of experience with GUI scripting, but I don’t understand why you are addressing the Terminal, when you really need to interact with EyeTV.

Moreover, when I open EyeTV’s AppleScript dictionary in Script Editor (by dragging EyeTV’s application icon onto Script Editor’s application icon), I see that there is already an AppleScript command available to enter full screen mode programatically (I own EyeTV 2.5.3):

tell application "EyeTV"
	delay 5
	enter full screen
end tell

And this works great on my Mac :smiley:

Maybe this is of some help.

Thanks for the reply. This more effectively does the same thing with much better coding. I’m not sure how eyetv seperates both the turn on program and also turn on the tv screen. These seem to be two separate commands. The problem still exists that while eyetv is running, the script is still open.
Any idea on how to turn off the applescript while eyetv is still on?

I also experience this phenomenon: The script stays open as long as EyeTV is in full screen mode. Only if you exit the full screen mode, then the script exits. This is somehow a form of strange behavior. And I don’t have a solution available.