• 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: Calling AppleScript from Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling AppleScript from Cocoa


  • Subject: Re: Calling AppleScript from Cocoa
  • From: John Stiles <email@hidden>
  • Date: Fri, 31 Dec 2004 22:23:13 -0800

tell application "iTunes"
	activate
end tell


On Dec 31, 2004, at 9:43 PM, Stephen Champeau wrote:

I have an application that began as an AppleScript Studio project, but over time I realized I wanted the full power of Cocoa at my disposal, so switched.

I still want to make AppleScript calls to control iTunes, and have been experimenting with sending small scripts to the NSAppleScript object. One annoying thing I have found is that when I tell iTunes to "activate" from one of these scripts, iTunes launches but does not become the active application -- my Cocoa app remains in the foreground. Much of the functionality I am trying to automate with AppleScript depends on iTunes being the active application. When I run the same script from the Script Editor, it works great.

Is there some way of bringing another application into the foreground? I'm new to both AppleScript and Cocoa, so my apologies if this is a dumb question.

Thanks,
Steve C.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Calling AppleScript from Cocoa (From: Stephen Champeau <email@hidden>)

  • Prev by Date: Re: Accurate decimal numbers?
  • Next by Date: Re: storing, searching, and displaying variable-sized data sets
  • Previous by thread: Calling AppleScript from Cocoa
  • Index(es):
    • Date
    • Thread