m417z / Textify

A tool for Windows to copy text from dialogs and controls which don't allow it otherwise
https://ramensoftware.com/textify
GNU General Public License v3.0
907 stars 76 forks source link

Quotation mark issues in `command=` #14

Closed GH01 closed 2 years ago

GH01 commented 2 years ago

1. command=%rs or command="%rs"

If the string contains a space, like: D:\my folder\app.exe

Textify Error:

An error occurred while trying to execute the following command:
%rs

BTW, please show the error part of the string (e.g. D:\my) in the message, rather than just show %rs as above.


2. command="D:\my folder\app.exe" "%rs"

Textify Error:

An error occurred while trying to execute the following command:
D:\my folder\app.exe" "%rs

command= should support 2 or more pairs of quotation marks, because paths/parameters could contain spaces.

m417z commented 2 years ago

Due to the format of the ini file, you need to use quotes twice. For example: command=""%rs"" command=""D:\my folder\app.exe" "%rs""

See also: https://ramensoftware.com/textify/comment-page-4#comment-12808