@nofilenamequoting
@set xsrc={sourcepath$}
@set search={dlgstring|Enter Everything Search Query\nYou can do a /regex search \d\d\d/ using slashes\n\nNOTE: Searching current folder only!}
Go NEWTAB
EverythingDopus {$xsrc} {$search}
But apparently {sourcepath$} is empty (so the button doesn't run), but that only occurs if I have a {dlgstring} in it. If I remove that line, it works.
I think it's because of the Go NEWTAB opening a blank folder tab.
Change it to Go "C:\" NEWTAB or similar, so the new tab has a path.
You'll probably also need to put quotes around {$xsrc} or you won't know where the path ends and the query string begins. (Since automatic quoting has been turned off at the start of the command.)
I tested it earlier, and again just now. This is working fine here:
@nofilenamequoting
@set xsrc={sourcepath$}
@set search={dlgstring|Enter Everything Search Query\nYou can do a /regex search \d\d\d/ using slashes\n\nNOTE: Searching current folder only!}
Go "C:\" NEWTAB
"/home/dopusrt.exe" /ArgsMsgBox "{$xsrc}" {$search}
If I type Test into the requester, it results in:
Which also reveals that you probably want {sourcepath$|noterm} to avoid the \" causing problems with some command-line parsing code:
@nofilenamequoting
@set xsrc={sourcepath$|noterm}
@set search={dlgstring|Enter Everything Search Query\nYou can do a /regex search \d\d\d/ using slashes\n\nNOTE: Searching current folder only!}
Go "C:\" NEWTAB
"/home/dopusrt.exe" /ArgsMsgBox "{$xsrc}" {$search}
So, to make the button work, I need to set the quotes like this:
EverythingDopus "{$xsrc} {$search}"
And I can call the script function
If there's any obvious caveat I missed, could you please let me know?
About the NEWTAB part, I'll just move that away from the button and into the CLI app itself
It indeed has a weird behavior with {sourcepath$} (Though {sourcepath} seem to work fine), even if button is setting the variable before running the Go NEWTAB part