Jump to content
Sign in to follow this  
nimral

Keystroke commands in strings

Recommended Posts

nimral

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 by nimral

Share this post


Link to post
Share on other sites
nimral

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

Share this post


Link to post
Share on other sites
Jos

This should work fine i think:

Send("!S")
Send("Password!",1)
Send("{Tab}")
Send("Password!",1)
Send("{Enter}")

:)

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Blue_Drache

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×