QAP Support Forum

Full Version: Add a QAP feature to create a Snippet from the content of the Clipboard
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Suggestion from AlbatrosXL.
More detailed description.

Feature name: Add snippet from Clipboard
Categories: QAP Menu Editing, Featured

The clipboard must be copied by the user before calling the feature. Copy the current selection by QAP is unreliable in some apps.

I hesitate between these two approaches:

Option 1) (more quickly done)
Display the "Add favorite" dialog box for Snippet type with pre-filled values:
- Short name: first n chars from the clipboard content
- Content: full content of the clipboard
- All other values: default that can be modified by user before user closes the "Add favorite" dialog box (click "Add") and saves the favorites in Customize window.

Option 2) (much more work)
Display a new dialog box with fields:
- Short name: first n chars from the clipboard content
- Content: full content of the clipboard
- Hotstring button (opening the "Change hotstring" dialog box)
- Save / Cancel buttons
All other values are default and can only be modified later in the Customize window.
The default menu for new hotstrings could be defined in "Options, Snippet and Hotstrings": dropdown list named Parent menu for snippes added with QAP Feature "Add snippet from Clipboard".
When user saves the new snippet, the favorite is immediately saved to the ini file and the menu is reloaded including the added snippet.
Finally, I've done option #2 in release v10.3.