Well, direct scripting of Lotus Notes is now off-limits in my book. I tried their send e-mail script…
property ToAddress : "Joe_User@iris.com"
property CCAddress : "Joe_User@iris.com"
tell application "Notes"
set myDB to make new database with data {"", ""}
try
openmail myDB
on error
end try
set myDoc to make new document with data {myDB}
replaceitemvalue myDoc itemname "SendTo" newvalue ToAddress
replaceitemvalue myDoc itemname "Subject" newvalue "Untitled"
replaceitemvalue myDoc itemname "Body" newvalue "I'm actually trying to send this one"
replaceitemvalue myDoc itemname "CopyTo" newvalue CCAddress
send myDoc without attachform
end tell
…and it was like AppleScript Shop of Horrors:
–First time I tried, it seemed to do nothing, then destabilized Notes, then Script Debugger, then Notes wouldn’t relaunch, requiring a reboot of the system. That never happens. As in, the first time anything like that has happened since the OS 9 version of Notes.
–After the relaunch, apparently it actually did send the e-mail to the Joe address in the sample (oops!) because I got a bounce. But what scares me is it apparently bypassed the normal e-mail mechanism because there was nothing in my “sent” folder. This is corporate bad-mojo and I’ll be lucky if I don’t get an annoyed phone call soon from IS since we’re not supposed to tamper with the underpinnings like that. Good thing I’m on good terms with IS… O.o
–I decided to try-again (commenting-out the last line which seems to do the sending), and Script Debugger had issues opening the AppleScript dictionary for Notes. It could compile the script, but attempts to save it would cause ScriptDebugger to hang, requiring a force quit. I’ve had to force quit Script Debugger now and again for random things, but never 100% repeatable like this.
–Compiled the script in Script Editor and saved it well enough. But did nothing on execution…or apparently nothing. It might have done more “background magic” but without the “send” line nothing came of it. Then Notes and Script Editor both promptly crashed.
Sounds like a damaged or malformed dictionary issue, at the very least; poor AppleScript support also likely.
Admitedly my company’s way of doing things is often non-standard in their perpetual goal of uber-security and customization, so it’s possible my company’s fiddling on the back-end or in the NotesID file is the culrpit. Still, I never see applications do the wierd stuff Notes does (and we’re not talking just AppleScript here).
Frankly, that’s enough to make me stick to kludgy UI scripting. I don’t have the luxury of a re-install because of the quirkyness of the software and corporate needs it would mean blowing 30-60 minutes of the tech’s time. Been there, done that, painful it was. Notes has a come a long way since OS 9, but apparently still needs work.
Ah well, I have a laundry list of things I hate about Notes, this is just another checklist item.
[EDIT: Forgot to mention, when I go into any of the various “property” items scattered in Notes, none of them give me any field information. This is a corporate system (i.e. the databases generally live server-side) so it’s possible I’m not allowed to see that information.]