• 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
AppleScript "call method" (not an AS Studio app)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript "call method" (not an AS Studio app)


  • Subject: AppleScript "call method" (not an AS Studio app)
  • From: Alan Somers <email@hidden>
  • Date: Wed, 3 Sep 2003 06:58:18 -0500

Does anybody know how to call a Cocoa method from AppleScript in a non-AppleScript Studio app? How do I get the object instance into the script (setting it in Interface Builder doesn't work) and what else must I do to successfully invoke the "call method" command on that instance?

Here's what I'm trying to accomplish: I have a Cocoa app that uses an NSAppleScript object to perform certain inter-application operations, invoking various handlers in the script using executeAppleEvent:error calls. In some of those handlers, I'd like to be able to periodically call a Cocoa method to update a progress dialog. The reason I don't think I can implement it as an AppleScript Studio app (which would allow me to easily use "call method" to update the progress) is because I need the script's run handler to be executed directly by another app (iTunes) to start my app. Also, all the AppleScript code needs to be in the same compiled script file so that only one item appears in the iTunes script menu when the app is dropped into the ~/Library/iTunes/Scripts folder.

TIA.
Alan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Loading of NSWindows during awakeFromNib
  • Next by Date: Re: Selector runs only once
  • Previous by thread: init'ing an NSNotificationQueue
  • Next by thread: PopUpButton with a custom apparence using an image
  • Index(es):
    • Date
    • Thread