Re: Yosemite and activate failures
Re: Yosemite and activate failures
- Subject: Re: Yosemite and activate failures
- From: Shane Stanley <email@hidden>
- Date: Fri, 16 Jan 2015 15:55:59 +1100
- Sun-java-system-smtp-warning: Lines longer than SMTP allows found and truncated.
On 16 Jan 2015, at 12:41 pm, Ray Robertson <email@hidden> wrote:
With System Events, though, will the process name property at least always be consistent from Mac to Mac?
Yes. But you can always get it at run time:
use scripting additions use framework "Foundation"
my activateAppAtPath:(POSIX path of (path to application "Adobe Illustrator"))
on activateAppAtPath:appPosixPath set theNSBundle to current application's NSBundle's bundleWithPath:appPosixPath set processName to (theNSBundle's objectForInfoDictionaryKey:"CFBundleName") as text tell application "System Events" to tell process processName set frontmost to true end tell end activateAppAtPath: |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden