Hi,

I’m running the following Script from a Cocoa App using NSAppleScript:

set myWindowName to "Test 2"
set myNewSubject to "[High] Test 2"
tell application id "com.microsoft.Outlook"
        activate
        save front window
        set myMessageList to current messages
        set myMessage to item 1 of myMessageList
        set mySubject to the subject of myMessage
        set the subject of myMessage to myNewSubject
        save front window
end tell

The Script doesn’t work, e.g it doesn’t change the Subject field, however if I 
run it under the Script Editor it works ok.

The Script compiles and runs with no errors from compileAndReturnError:

Not sure why it doesn’t work and not sure where to start looking?

All the Best
Dave


_______________________________________________

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

Reply via email to