Skip to content

New Tools menu #499

Description

@ProgerXP

Add a new main menu after Settings: &Tools, populated from the new [Tools] INI section (in order of keys there; & creates accelerator). INI values are command lines to run when the menu item is invoked. If none, add a single disabled informational menu command named Edit [Tools] in INI. Add 5 toolbar buttons (named Tool N; not on default toolbar) for quick triggering up to first 5 commands; implementation may disable corresponding button if no such tool is defined.

The process' stdin is set to the selection (may be empty) and its stdout replaces the selection. Both streams operate in UTF-8 mode. Entire operation must be grouped under a single Undo entry (Ctrl+Z to return buffer state prior to the invocation). While the process is running, display a standard Notepad2 message box with copiable text and OK button; initialize the text to the command line executed, then blank line. Append stderr output (live or once after the process exits). If the box is closed (OK), terminate the process. After the process exits, close the box automatically if the exit code is 0 and nothing was produced to stderr, otherwise keep it and append blank line (unless stderr is empty), then ** Exit code N to the text. Stdout is required to replace selection upon success (0 and no stderr) but implementation is free to choose other details: replacing always, streaming, etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions