Jump to content

Keystroke commands in strings


nimral
 Share

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...