HI,
I'm re-working Note-chan as a Cocoa app (mostly just for the practice with Cocoa) and I want this version to be able to include all of the clipboard contents in the note that Mori is able to handle. Anyone have any suggestions about what might be the easiest way to go about this? Unless I make note-chan into a plugin, doesn't it have to go through applescript to get a new entry made (I've been able to use NSApplescript successfully to get it done.)
So my ideas are:
1. format the clipboard and note text in note-chan as a NSAttributedString (can that handle attachments/images?). Then send it through Applescript to Mori.
2. Send the note text first, then try to get Mori to Paste the clipboard contents into the note.
3. Somehow use the Mori clipping services to do the work.
Any hints about how to proceed on the most likely successful of these, would be greatly appreciated.
Thanks
It's probably possible with
It's probably possible with applescript (by scripting the GUI to past into the right place), but it looks to me like using NSPerformService(@"Mori/Make New Entry", pboard) is the easiest method. After invoking the service you might use applescript to move the entry to some folder specified in Note-chan's window. Also it looks like perform service should be a common mechanism that you can use to send info to other apps. I did read that one problem with using NSPerformService is that it will break if the service menu item name changes, but it seems like ease of use should probably win out in this case.