Sign in to follow this  
Followers 0
DeuxDeTension

[SOLVED] SendKey without an echo

9 posts in this topic

#1 ·  Posted (edited)

Hello all,

I would like to use AutoIt's SendKey function to type characters, without them appearing on screen. I have been looking for an optional parameter to the SendKey function itself, just as the ', 1' you add to send raw keystrokes, or for an AutoItSetOption option, but I haven't found what I'm looking for. Do anyone around how I could do that?

Thanks in advance.

Edited by DeuxDeTension

Share this post


Link to post
Share on other sites



I have looked through the AutoIt help file, and I have been unable to find the SendKey function. Is this a UDF outside of the AutoIt libraries that you are trying to use?

Share this post


Link to post
Share on other sites

I have looked through the AutoIt help file, and I have been unable to find the SendKey function. Is this a UDF outside of the AutoIt libraries that you are trying to use?

Ooops, my mistake, I meant Send, not SendKey. Sorry...

Share this post


Link to post
Share on other sites

what are you trying to work with? Game? app? We don't have enough to go on.

I use PuTTY the whole day long, to work remotely on Unix servers, and I'd like to automate as much possible the connection process, including (but not limited to) typing my password (yes, I know it's not a good idea, security-wise, but I'm getting fed up). Does this help?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hello all,

I would like to use AutoIt's SendKey function to type characters, without them appearing on screen. I have been looking for an optional parameter to the SendKey function itself, just as the ', 1' you add to send raw keystrokes, or for an AutoItSetOption option, but I haven't found what I'm looking for. Do anyone around how I could do that?

Thanks in advance.

I don't see how the Send function itself could ever do what you ask. Think of it this way, the Send function has the very same restrictions as the keyboard. So, the Send function can ONLY do what you can to manually with the keyboard.

I don't think you can stop putty or any terminal program from displaying text injected by the SEND function. Sorry.

Edited by jamesband

Share this post


Link to post
Share on other sites

Maybe a workaround for Input controls... didn't try it myself :), I just assume it should work... is to change the target control style with _WinAPI_SetWindowLong() using $ES_PASSWORD?

Share this post


Link to post
Share on other sites

OK, problem solved... very easily indeed, with a call to Sleep, with the appropriate delay found by trial and error, before sending the characters I don't want to see appearing on screen. This way, the remote machine has enough time to enter the state where it expects a password and doesn't echo what I send. Thanks to anyone who took the time to reply.

Another (related) question: how do I mark this topic as solved?

Share this post


Link to post
Share on other sites

OK, problem solved... very easily indeed, with a call to Sleep, with the appropriate delay found by trial and error, before sending the characters I don't want to see appearing on screen. This way, the remote machine has enough time to enter the state where it expects a password and doesn't echo what I send. Thanks to anyone who took the time to reply.

Another (related) question: how do I mark this topic as solved?

Just edit your first post and put SOLVED at the beginning of the title. That should work ok.

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  
Followers 0