• 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 a C Subroutine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a C Subroutine


  • Subject: Re: Calling a C Subroutine
  • From: has <email@hidden>
  • Date: Sat, 10 Jan 2009 16:31:58 +0000

Gil Dawson wrote:

I have an AppleScript Studio project that's working OK.  I would like
to add a subroutine to compute a checksum.  I have the fully tested
subroutine coded in C.  I'd rather not recode it into AppleScript,
although I suppose I could.

Is there a way to call from Applescript a C subroutine, passing a
string and returning an integer?


1. Wrap your C subroutine in a scripting addition, and include it in your application bundle under Resources/ScriptingAdditions.

2. Wrap it as a method in an ObjC class and include it in your project, then invoke it via Studio's 'call method' command.

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________
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: Re: Ent 2008 Remove text "AUGD: " from Subject
  • Next by Date: Using AppleScript in Matlab to read/write to Excel 2004
  • Previous by thread: Re: Calling a C Subroutine
  • Next by thread: Re: How would I trim off 5 inches from the right side of PDF in Acrobat using AppleScript?
  • Index(es):
    • Date
    • Thread