Hi there,
first off, i am using up-to-date keepass 2.25 and a standard kdbx database.
i am running windows 7 professional x64 and everything should be up-to-date.
i am currently trying to set up keepass as a product-key storage, so i can auto-type my product-keys when installing stuff.
now, for example, microsoft office 2010 requires the key to be split into 5 seperate input fields.
i set the Produkt key as Password following the standard key layout XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
so i thought of the following autotype-sequence:
{T-REPLACE-RX:#{PASSWORD}#-#{TAB}#}
for testing purpose, i am running this against a standard microsoft notepad window.
it fetches the password and replaces the "-", but not with an actual tab keystroke, instead with the characters {TAB} written out...
i did some additional testing:
the same thing happens when
using placeholder {ENTER} for the replace Parameter
using placeholder {S:customentry} for the text Parameter
what sort of works:
using placeholder {S:customentry} for the replace parameter, it will type the characters stored in this entry, but it still won't process any placeholders it finds.
in the help file i read for {T-REPLACE-RX} "All parameters are Spr-compiled, i.e. placeholders can be used within them.", so i'd assume that all placeholders, including {TAB}, should work for the "replace" parameter.
i made sure everything on my side is set up correctly and thus i have to guess it has to be some sort of bug... if not so, please inform me how i can improve my ways to auto-type this thingy.
of course, if you need any further Information, please ask and i will gladly provide.
it would be awesome if i could get this to work, as it would vastly improve our workflow , and open up a whole new opportunity to make the most out of keepass.
thx in advance,
and keep it snapin' :)
I wouldn't expect that to work as the regular expression engine in .NET doesn't understand KeePass place holders. To make it work you need to split the text into numbered matches, then use those matches interspersed with KeePass place holders.
e.g.
{T-REPLACE-RX:#{S:customentry}#(....)(\W)(....)(\W)(....)#$1#}{TAB}{T-REPLACE-RX:#{S:customentry}#(....)(\W)(....)(\W)(....)#$3#}{TAB}{T-REPLACE-RX:#{S:customentry}#(....)(\W)(....)(\W)(....)#$5#}{ENTER}
The match numbers "$1" etc replace the text with the required segment. The "\W" match finds the non word character, "-" in your case. You could replace it with "-" instead.
You will obviously need to add more sections to match the 5 segments you need
cheers, Paul
The current behavior is intended.
As you cited already, the parameters are Spr-compiled, thus the compiled parts are treated as data (and thus the curly braces are encoded and will be sent literally by the key sending engine). This is comparable to entering '{TAB}' in the password field instead of the auto-type sequence; here you also expect the string '{TAB}' to be sent literally instead of the Tab key being pressed.
One specialized solution to your specific problem would be the following auto-type sequence:
{T-REPLACE-RX:#{PASSWORD}#-# #}
The symbol between '-#' and '#}' is a Tab character (this can e.g. be inserted by pressing Tab in Notepad, selecting the Tab using Shift-LeftArrow, copy using Ctrl+C and paste into the auto-type sequence field using Ctrl+V).
Paul's solution is more generic and allows other special key codes to be used.
Best regards,
Dominik
Could you please update the documentation? There it is not clear at all that the placeholders in the Replace string of T-REPLACE-RX are not replaced by corresponding intepretation (e.g. keypresses).
The second clause in the explication "All parameters are Spr-compiled, i.e. placeholders can be used within them." suggests the contrary. I read it as "Placeholders will work as usually."
It would be great if the functionality of T-REPLACE-RX could be extended so that placeholders in the Replace string will be interpreted. Unfortunately both the solutions shown above have severe limitations.