Search code examples
lotus-notesautohotkeylotusscriptlotus-formula

Create Lotus Notes hotkey/shortcut key for "reply to all with history"


Because I like to make common actions quick to access, I'd like to define a hotkey, e.g. Alt+L to do "reply to all with history", to act on the selected email. I'm using Lotus Notes 8.5 under Windows. Currently I have to either click the Reply button and then click "Reply to All with History Only" or I have to press Alt+3 then cursor down several times and press enter. Actually, Alt+3 doesn't always work because if the email is opened in its own window then you have to use Alt+2.

I've pursued several solutions:
o I've looked for consistent hotkeys within Lotus Notes, but no luck. The shortcut key support in Lotus Notes is not very good, and you can't define custom shortcut keys.

o I've tried using AutoHotkey to send keystrokes to Lotus. You can do a reply by typing Alt+A to get to the Actions menu. Unfortunately, the accelerator keys underneath the Actions menu change whether you are in the email list or if the email is in its own window. Also, the Actions menu doesn't always drop down quickly, so timing the sent keystrokes is problematic.

o I've tried writing LotusScript Agents to do a reply all. I've learned there is a Shared Action named "Reply to All\Reply to All with History Only". I don't think there is a way to have an Agent call an existing Shared Action, so I guess I can just clone the Shared Action code into my Agent. That still leaves the problem of invoking the Agent via a hotkey.

o I haven't tried it yet, but I think the solution will be to create an Agent that can perform a reply all. Create a VBS script to use the Lotus Notes OLE/COM interface to invoke the agent then have AutoHotkey call the VBS file when a hotkey is pressed. FYI: AutoHotkey doesn't support COM directly. However AutoIt and I believe AutoHotkey_L do support both COM and hotkeys so I could use one of those languages.

I'm open to any suggestions, but I want a solution that is reliable. As mentioned, my current AutoHotkey solution fails sometimes because the Lotus GUI is not a very standard Windows GUI. As I understand it, the Lotus GUI is a Java/Eclipse application. I believe Lotus supports Eclipse plugins, so maybe that is an option.


Solution

  • You might be able to make your life easier with a custom smarticon (toolbar button). I don't have 8.5 to test this on, but it works on Notes 6.

    Go into the design view of the mail database, and open up the memo form. Then look for the action button you are trying to duplicate. Copy all the formula code (probably just a few lines). Then create a new toolbar button by right-clicking on a toolbar and choosing Toolbar properties. Paste the formula into the button and save.

    This still doesn't get you the shortcut key trigger you're looking for, but perhaps in 8.5 you can assign a hotkey to a toolbar icon? If not, you could create an AutoHotKey script, triggered by a hotkey you choose, that simulates clicking the smarticon button using references relative to the current window. I think it would be consistent provided the toolbar is always in the same place.