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

Re: Scripting Bridge Question


  • Subject: Re: Scripting Bridge Question
  • From: has <email@hidden>
  • Date: Mon, 26 Oct 2015 14:23:59 +0000
  • X_v_e_cd: 07558c6b0e701f074cfd0ee7a87d152c
  • X_v_r_cd: e6c4947cb12eacb3a53f413c17bfcade

Dave wrote:

> I’m using the Scripting Bridge to Target MS Outlook. I’m trying to figure out how to do the following AppleScript using the Scripting Bridge. Please see Full Script below, I’ve got most of the code, but I can’t seem to figure out the right Objective-C code for these two statements:
Scripting Bridge doesn't work properly; never has, never will. According
to the Apple developer that wrote it, it wasn't designed to work with
Carbon apps (which is funny cos it doesn't work right with Cocoa ones
either). Maybe your AS code will translate; maybe it won't. Maybe it'll
work, maybe it won't. If it doesn't, you'll have zero clue why. For
anything non-trivial, you're best sticking to AppleScript: it's the
ONLY[1] solution that actually works right.
Since you're using ObjC/Cocoa and already have a working AppleScript
implementation, the neatest solution is to use the AppleScript-ObjC
bridge to call your AppleScript code directly. Just wrap your AS code as
handlers in script objects that inherit from NSObject, and you can call
them pretty much as you would native ObjC methods. Quick how-to here:
    http://appscript.sourceforge.net/asoc.html

HTH

has

--

[1] Specifically, it's the only *currently supported* solution that works right. I no longer support appscript, am not going to waste anyone's time promoting AppleEventBridge (which I only did in a failed attempt to prevent the Automation team screwing up JavaScript too), and I'm not interested in finishing/supporting SwiftAE unless Apple can be persuaded to adopt it for OS X. If anyone here still cares about Mac Automation, please feel free to contact me off-list with any advice/criticism/encouragement/support.
http://appscript.sourceforge.net
https://bitbucket.org/hhas/appleeventbridge
https://bitbucket.org/hhas/swiftae  (docs: http://hhas.bitbucket.org)
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Scripting Bridge Question
      • From: Dave <email@hidden>
  • Prev by Date: Scripting Bridge Question.....
  • Next by Date: Re: Scripting Bridge Question
  • Previous by thread: Scripting Bridge Question.....
  • Next by thread: Re: Scripting Bridge Question
  • Index(es):
    • Date
    • Thread