Add macro names progammatically to custom menu

asked 2015-10-12 20:57:06 +0200

OregonJohn gravatar image

Hi. I would like to open a search box that lists the names of the macros in a module so I can easily search for the one I want to run. I want to do this directly from the keyboard. Any ideas on where to start to create such a thing, or something that will work similarly?

I have over 400 small macros that insert text and/or insert documents into a new document. Frequently a macro has a combination of actions like insert text and insert document.

I created a menu item in Libre Writer for my custom macros (used the ~ to give it a shortcut reference) and that works somewhat, but I have to insert the macro names into the menu one at a time and, especially if a macro is added or deleted, it become tedious to update. Also, I can't search in the menu for the name I want, though the shortcut letter is a bit of help, but when you have hundreds then shortcut letters aren't a lot of help..

Templates fail to work for me because there are too many combinations of texts.

What I would like, I think, is to open a search box where I can start typing to get the macro I want then hit enter to get it running. No mouse involved at all and limited keys pressed.

ADDENDUM: These are macros coming from WordPerfect. WP stores it's macros in individual files. I managed to run an AutoIt script that looped through folders, opened each macro for editing, copied the apparent text, then put that into a text document using the WP macro file name. Now I have all the macros in a simple language I can programmatically translate into LibreOffice macros. I can easily run a script to translate and insert the text into the module as individual macros. No problem there. Here's a sample of the WP macro text:

Application (WordPerfect; "WordPerfect"; Default!; "EN") MacroFilePlay (Filename: "ltrhd.wcm") PosLineDown () FileInsert (Filename: "F:\HOME\COREL\LETTER\ARM1.WPD"; AutoDetect: No!) PosLineDown () PosLineDown ()

Thank you in advance for any help you can give. John in Oregon

edit retag flag offensive close merge delete