Skip to content

EditorSelectionGui requires quote marks for program paths containing spaces #22

@Lexikos

Description

@Lexikos

As reported in https://www.autohotkey.com/boards/viewtopic.php?f=60&t=132503

If the program path contains spaces and is not quoted, CmdChanged fails to validate the command line and does not enable the OK button. This is because CommandLineToArgvW requires each component to be quoted (i.e. it is a string of args, not a command line), whereas CreateProcess permits the program name to contain spaces even if it is not quoted; e.g. C:\Program Files\A\B.exe "%1" can run C:\Program.exe or C:\Program Files\A\B.exe depending on what exists.

When the initial portion is not quoted, CmdChanged should test each space-terminated prefix (appending .exe if no extension is present) until the program is found, then update the command line to quote the program name, and enable the OK button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions