aisingapore / TagUI

Free RPA tool by AI Singapore
Apache License 2.0
5.68k stars 585 forks source link

TagUI - RUN misbehave with parameters between double quote #1306

Closed GarneshMike closed 3 months ago

GarneshMike commented 2 years ago

Hi there,

I'm running an external command with arguments using RUN function as below. Command : "C:\tagui\set_focus.exe" Argument 1 : --windows_name="test file" Argument 2 : --windows_mode="restore"

It seems the double quote does not have any impact on parsing the arguments. Is there any workaround available. Thanks in advance.

//TagUI Script run "C:\tagui\set_focus.exe" --windows_name="test file" --windows_mode="restore" echo run_result

//Results START - automation started - Fri Nov 25 2022 16:24:13 GMT+0800 (Malay Peninsula Standard Time) run "C:\tagui\set_focus.exe" --windows_name="test file" --windows_mode="restore" usage: set_focus.exe [-h] --windows_name WINDOWS_NAME --windows_mode WINDOWS_MODE set_focus.exe: error: unrecognized arguments: file"

FINISH - automation finished - 0.9s

ruthtxh commented 1 year ago

Hi @GarneshMike can you try this to run your external programme?

run cmd /c start C:\\tagui\\set_focus.exe
GarneshMike commented 1 year ago

Hi Ruth,

After further analysis I've found out that TagUI parses backslash (\) to escape the double quote (\") during the run command.

Example: run cmd /c command "arg1" TagUI translate into => command \"arg1\"

So I wrote a wrapper to remove the escape characters.

Anyway thanks for the feedback.

marcelocecin commented 1 year ago

https://github.com/aisingapore/TagUI/issues/1135

kensoh commented 3 months ago

Closing but please ping back if this is still relevant of an issue.