Ok, I hear what you are saying but I’ve almost got it working as it is and what I’m doing is not that difficult and I should be able to do it in the Scripting Bridge, the thing that is confusing me is that:
set myObjectID to the id of (object of myWindow) set myContent to the plain text content of message id myObjectID what is "message id” in this case? In There is a definition of: @interface SXOutlook2011Object : SXOutlook2011Item - (NSInteger) id; // The unique ID of a record. @end Which shows the id as being an Integer but on SBElementArray, there is a method: - (ObjectType) objectWithID:(id)identifier; Which takes an object, not an integer, I think if I could get the correct ID for the message I could just call this method which would solve my problem. I’ve got a work-around that seems to work which is to get the Outgoing Message from the current messages array instead of via the Window. This does seem to work, but and I think it will be ok to use it, I’m just slightly worried that there may be a case where the message of the front window is not the same as the current message….. All the Best Dave > On 26 Oct 2015, at 14:23, has <hengist.p...@virgin.net> wrote: > > 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 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com