Re: AppleScriptObjC Problem?
Re: AppleScriptObjC Problem?
- Subject: Re: AppleScriptObjC Problem?
- From: Dave <email@hidden>
- Date: Thu, 12 Nov 2015 12:21:06 +0000
Hi Shane,
Thanks a lot for helping on this.
> On 11 Nov 2015, at 22:15, Shane Stanley <email@hidden> wrote:
>
> On 12 Nov 2015, at 3:15 AM, Dave <email@hidden> wrote:
>
>> I’m using the AppleScript-ObjC Bridge to call an AppleScript from an XCode Objective-C project. This is the handler I am calling:
>>
>> on getOutlookMessagePropertiesDictionaryWithMessageID:(theMessageIDString)
>> set myDictionary to the pMessageDictionary of me
>> set myMessageID to theMessageIDString as number
>
> If theMessageIDString is an NSString passed from Objective-C, it will still be an NSString -- you need to convert it to text first. Try "as text as number”.
>
I have this in one script which returns myDictionary to Objective-C.
set kWindowObjectID of myDictionary to the id of the object of myActiveWindow as string
The Window ID is then extracted from the Dictionary and passed to another AppleScript Handler:
on saveOutlookWindowWithWindowID:(theWindowID)
say "saveOutlookWindowWithWindowID"
set myDictionary to the pWindowDictionary of me
set myWindowID to theWindowID as number
tell application "Microsoft Outlook"
set myActiveWindow to (get window id myWindowID)
save myActiveWindow
end tell
return myDictionary
end saveOutlookWindowWithWindowID:
Which seems to work ok, but can you see anything wrong with what I am doing?
All the Best
Dave
_______________________________________________
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