I've been playing around with quotes for the last few hours hours but haven't made any progress.
Normally I use
run lax("program.exe" -flag1 -flag2 <selitem>)
and it works great. Quotes can't be used in filenames so I've never had issues.
However, now I'm trying to write a simple script that will take an
input("Enter password")
, which may contain any number of quotes.
This is the line I'm using in my
popupnested()
menu, the goal is to request a password and then mount the
<selitem>
through
VeraCrypt. The command works fine if I use a password that contains no quotes, however I'd like to be able to use this script with any password.
Code: Select all
Mount: <curname>|$password = input("VeraCrypt: Mount the file '<curname>' as a volume", "Enter password");run lax("$PORTABLEAPPS\VeraCryptPortable\VeraCryptPortable.exe" /volume "<selitem>" /password ""$password"" /beep /explore /mountoption label="<curname>" /quit /silent)|
Failing Test Password (quotes):
|'P=(^@Rhx6"%([3@Q9;,UUf"kZ-eV|HIFM~,0'@-F/bCm}ZJ#9b/.~08;7<
Succeeding Password (no quotes):
$dtWZ0YJl-fl\$b|rB>?2dV\+Cv5=nr\7&iUdJNND7sD*8krDR{,^_>+KBA6
Any tips?
P.S
I'd like to hide the characters in the user-input box but it doesn't seem to be an option, is there a way to do this? What about changing the title of the window from
input to a custom string? It'd be nice to have a unique window title that I could match with KeePass' auto-type feature.