Re: Scripting Bridge, System Events, current application
Re: Scripting Bridge, System Events, current application
- Subject: Re: Scripting Bridge, System Events, current application
- From: Matt Neuburg <email@hidden>
- Date: Wed, 04 Aug 2010 08:52:27 -0700
- Thread-topic: Scripting Bridge, System Events, current application
On Wed, 4 Aug 2010 09:15:59 -0600, Pete Siemsen <email@hidden> said:
>I'm using Scripting Bridge to implement some behavior in an Objective-C
program. Much of it works, but I'm having trouble creating Scripting Bridge
code that implements the following AppleScript behavior:
>
> set previousApp to the name of the current application
> -- some stuff happens here that includes "activating" an app
> tell application previousApp to activate
Why are you using Scripting Bridge for this? You are already in Objective-C,
so just do it directly. NSWorkspace (and, on Snow Leopard,
NSRunningApplication) gives you everything you need. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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