nimral Posted September 27, 2007 Posted September 27, 2007 (edited) Hi all, I have a wicked problem with concatenated strings in autioit. I need to enter values in a password entry dialog box. To do this I need to type: Alt-S (activate a control containing the entry fields) <the password> Tab (proceed to next entry field) <the password> (password confirmation) Enter (quit the dialog) The whole sequence is built together within the program code, since the password differs, processed in some way and the resulting string is passed to sendkeys. Now I need to send a Password which happens to have a "!" at the end, e.g. "Password!" Sendkeys gets the sequence !SPassword!{Tab}Password!{Enter} and sends Alt-S,"Password",Alt-Tab,"Password",Alt-Enter. I cannot simply use 3 Sendkeys statements in sequence. Is there any way I can tell Sendkeys that ! does not mean Alt but that the ! is to be sent as a normal character? Thanx Armin Edited September 27, 2007 by nimral
Developers Jos Posted September 27, 2007 Developers Posted September 27, 2007 Just use the send raw option . SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
nimral Posted September 27, 2007 Author Posted September 27, 2007 Just use the send raw option .this was a really quick response, thanks, but how should this Option help?!SPassword!{Tab}Password!{Enter}The first "!" does indeed mean Alt-Key, the others don't, how should Sendkeys know, with or without the send raw option?...Armin
Developers Jos Posted September 27, 2007 Developers Posted September 27, 2007 (edited) This should work fine i think: Send("!S") Send("Password!",1) Send("{Tab}") Send("Password!",1) Send("{Enter}") Edited September 27, 2007 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
aslani Posted September 27, 2007 Posted September 27, 2007 Or... Send("!S") Send("Password") Send("{!}") Send("{Tab}") Send("Password") Send("{!}") Send("{Enter}") [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
Blue_Drache Posted September 27, 2007 Posted September 27, 2007 Good, yes, that works, but ... it's kludgy. Just use the "send raw" option... I mean that's what it's there for, after all. Makes for better, more professional looking code. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now