• 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: Call Objective-C methods from any script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Call Objective-C methods from any script


  • Subject: Re: Call Objective-C methods from any script
  • From: daniel <email@hidden>
  • Date: Mon, 17 Jan 2005 17:14:00 -0800

This page has a pretty good summary of how to use the "call method" command and includes some examples:

http://developer.apple.com/documentation/AppleScript/Reference/ StudioReference/sr3_app_suite/chapter_3_section_20.html

If you're not already familiar with AppKit/Foundation frameworks from an Objective-C or Java programming perspective, the learning curve will probably be pretty steep.

Unfortunately, as I've played more with this today, I've run into lots of problems. Some method calls seem to work perfectly while many fail with NSArgumentEvaluationScriptError. I'm pretty sure I'm getting the syntax right, but something is not working right. Maybe this pot of gold isn't as rich as I was hoping :)

Daniel



On Jan 17, 2005, at 2:39 PM, Bruce Robertson wrote:

If you make the LSBackgroundOnly flag true for the app, it behaves
almost just like a scripting addition.  The only caveat being you have
to address it as an application, still.  I've posted my very simple
app, named "AppleScriptKit":

http://www.red-sweater.com/AppleScriptKit.zip

Simply download this and leave it on your computer. Now you can use all
of the AppleScript studio methods by using tell application
"AppleScriptKit" blocks!


Daniel

Sounds very cool.

For those of use who have not been messing with Studio, Objective C methods,
can somebody provide some simple examples or links to simple examples?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Call Objective-C methods from any script
      • From: Romy Opena <email@hidden>
References: 
 >Re: Call Objective-C methods from any script (From: Bruce Robertson <email@hidden>)

  • Prev by Date: System Events -- Differences in behavior calling from a menu and calling from SE
  • Next by Date: Re: Inconsistancy Between Do Shell Script and Terminal?
  • Previous by thread: Re: Call Objective-C methods from any script
  • Next by thread: Re: Call Objective-C methods from any script
  • Index(es):
    • Date
    • Thread