Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 3, 2011, 06:59 PM   #1
adamfishercox
macrumors 6502
 
Join Date: Aug 2007
Help an AppleScript noob!

I'm using AppleScripts and RemoteBuddy to manage Plex, Hulu Desktop, EyeTV, and Boxee on my Mac TV setup. I'm by no means a pro at AppleScript so I'd hope I could get some help here.

The goal is for the script to close whichever app is open, launch Boxee, and tab over to "Apps" and hit enter so that basically the button that I assign this script to will take me straight to the app screen. This works great for everything except Hulu Desktop. That section of the script just won't send the keystrokes. I've tried putting in delays everywhere and even had it send the keystrokes over and over just to test and it just won't send them. Any help?

Code:
tell application "System Events"
	if exists process "EyeTV" then
		tell application "Boxee" to launch
		tell application "EyeTV" to close every window
		tell application "Boxee" to activate
	end if
	if exists process "Hulu Desktop" then
		tell application "Boxee" to launch
		tell application "Boxee" to activate
		tell application "System Events" to key code 124
		tell application "System Events" to key code 124
		tell application "System Events" to key code 36
		tell application "System Events" to key code 124
		delay 1
		tell application "Hulu Desktop" to quit
	end if
	if exists process "Plex" then
		tell application "Plex" to quit
		tell application "Boxee" to launch
		tell application "Boxee" to activate
		delay 1
	end if
end tell
tell application "Boxee" to activate
tell application "System Events" to key code 124
tell application "System Events" to key code 124
tell application "System Events" to key code 36
tell application "System Events" to key code 124
__________________
Web, Icon and UI Designer adamfishercox.com
adamfishercox is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Applescript and lists Roadrun3r Mac Programming 6 Jun 5, 2011 06:20 AM
Please Help an ATV Noob bgut1 Apple TV and Home Theater 4 Apr 25, 2011 07:54 AM
Launching an AppleScript at startup North Pacific Mac Programming 7 Feb 28, 2011 02:08 PM
Applescript NOOB Revolume Mac Programming 2 Dec 1, 2010 08:06 AM
Iphone Pwnage - help an noob please - .ipsw file not recognized chris001 Jailbreaks and iOS Hacks 0 Apr 10, 2008 09:46 PM


All times are GMT -5. The time now is 10:57 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC