Knut Harald Støre wrote:
Thanks for the info. I'm not so keen to get into programming unless it can be done in AppleScript.
I have an odd relationship with AppleScript. I have written software in just about every language, from Assembly to million-line C++ monsters. But I can't get an AppleScript to work the same way twice. If I need a scripting language, I'll use Perl. If it is something that Perl can't handle, I'll use Objective-C because it is almost as easy.
But I dug into the info.plist file. It contains no URL registrations but I opened up Safari's info.plist file, found its URL registrations, copied into Notes's info.plist file and modified it appropriately. I then restarted Notes and closed it again hoping that it would be registered but it still doesn't work. When I try to open a "notes://" url from Terminal nothing happens. Do I have to do anything else to make the system rescan the info.plist file and register the association? Here is what I added to info.plist:
I'm pretty sure it will be more complicated than that. As I already mentioned, I can't get "Hello, World" to work in AppleScript so I can't help with that. Here is what I was thinking:
1) Write a program that knows how to handle a "notes:" URL. Look at the
Bwana source for an example. All you need at this point is a program that recognizes the URL and displays an alert with everything after "notes:" in the URL string. Test it by doing "open notes:yadayadayada" in the Terminal. I would do this in Objective-C. You may be able to do it in AppleScript. There is an
AppleScript forum where anyone will know more than me.
2) Find out what Apple script command are needed to tell Notes to open a particular message, given the contents of a Notes "notes:" URL. Hopefully Lotus Notes is scriptable and hopefully it has such a command. This is not guaranteed, however.
3) Change your first program from displaying an alert to executing the Applescript commands in Step 2. You're done.