• 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: AppleScriptObjC Problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: AppleScriptObjC Problem?
      • From: Shane Stanley <email@hidden>
References: 
 >AppleScriptObjC Problem? (From: Dave <email@hidden>)
 >Re: AppleScriptObjC Problem? (From: Shane Stanley <email@hidden>)

  • Prev by Date: AppleScript-ObjC Bridge - NSDictionary/Record Question
  • Next by Date: Re: OSX 10.11.1 Notes – Get Selected Note
  • Previous by thread: Re: AppleScriptObjC Problem?
  • Next by thread: Re: AppleScriptObjC Problem?
  • Index(es):
    • Date
    • Thread