Re: Scripting Bridge Question
Re: Scripting Bridge Question
- Subject: Re: Scripting Bridge Question
- From: has <email@hidden>
- Date: Mon, 26 Oct 2015 16:19:36 +0000
Dave wrote:
> 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
Only if SB lets you do it. There's lots of stuff that works perfectly in
AS that you *cannot do* in SB because SB is crippled and broken *by
design*. (I've long since stopped counting. Any AE bridge that pukes its
guts out at mere sight of InDesign simply isn't fit for use.)
Unfortunately, I have no experience scripting Outlook so cannot tell you
offhand how - or even if - you can do it in SB. One thing I can say is
that your AS code looks a bit odd and non-idiomatic itself (though that
is often the case with Office apps as their Apple event interfaces are
weird and cranky as hell):
set myObjectID to the id of (object of myWindow)
set myContent to the plain text content of message id myObjectID
In a standard Apple Event Object Model, an `id` value is a unique
identifier for a single object; thus, a by-id specifier, which is what
`message id ...` is roughly analogous to a managed pointer. So I
wouldn't normally expect to be able to take the id of a window object
and use it as the id of a message object; but then, like I say, Office
apps' AE interfaces aren't exactly standard.
Oh, and realize SB is spectacularly bad at coping with the more
"eccentric" scriptable apps, so it may not be possible to do the same
thing in SB. If so, you won't be the first person who's had to fall back
to AS for some things, or just abandon SB completely.
HTH
has
_______________________________________________
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