• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Bridge, System Events, current application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Scripting Bridge, System Events, current application
  • Next by Date: Re: Scripting Bridge, System Events, current application
  • Previous by thread: Scripting Bridge, System Events, current application
  • Next by thread: Re: Scripting Bridge, System Events, current application
  • Index(es):
    • Date
    • Thread