Hi,
I have a script that formerly worked with Jaguar. As I could find out in Apple’s Releases Notes http://www.apple.com/applescript/releasenotes/192OSX.html there has been a change of the text type returned by display dialog to typeUnicodeText…
Now any variable that I try to get from a dialog box and write to the Notes document does fail with a -10001 error.
Any varaibles defined by
set varName to "SomeText"
do work.
How can I use these unicode text together with Lotus Notes?
set ToAddress to "user@domain.com"
set Subject to "Some TEXT"
----- Enter Body Text
set BodyEntry to display dialog "Enter any additonal comments:" buttons {"Cancel", "OK"} default answer ("Some Text" & return) default button "OK"
set BodyText to the text returned of BodyEntry as string
tell application "Notes"
set myDB to make new database with data {"", ""}
try
openmail myDB
end try
set myDoc to make new document with data {myDB}
set rtitem to make new richtextitem with data {myDoc, "Body"}
replaceitemvalue myDoc itemname "SendTo" newvalue ToAddress
replaceitemvalue myDoc itemname "Subject" newvalue Subject
replaceitemvalue myDoc itemname "Body" newvalue BodyText
send myDoc without attachform
end tell
Regards, Thomas