Sign in to follow this  
Followers 0
Guest endlessly

Sending Keystrokes

4 posts in this topic

Ok, I must be blind or something^^

I looked in the AutoIt help files. Under Keyboard controls, it shows how you can send keystrokes such as ALT, CTRL, TAB, etc.

but...

How do you send "q" or "a" ? I tried Send ( "Q" ); and the same for A, but they did not work. Sorry for the newbie question:) I hope to learn how to use this program. Thanks.

Share this post


Link to post
Share on other sites



Send("A") does not works? Strange...

Can you show a scrap of your code?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I tried Send ( "Q" );

Send("Q");

Will work.

Send("Q")

Will work.

:ph34r:

; starts a comment but isn't needed at the end of a command. You need to send the Q to something though. You might be sending Q to no particular application and will not see a result.

Try looking over the help file and do this:

Run("Notepad.exe", "", @SW_MAXIMIZE)
WinActivate("Untitled - Notepad", "")
--put your send command here --

Not sure if that was your problem or not. Can you post your sample code.

Edited by randd

Raoul S. Duke: Few people understand the psychology of dealing with a highway traffic cop. Your normal speeder will panic and immediately pull over to the side. This is wrong. It arouses contempt in the cop-heart. Make the bastard chase you. He will follow.

Share this post


Link to post
Share on other sites

Ok, I must be blind or something^^

I looked in the AutoIt help files. Under Keyboard controls, it shows how you can send keystrokes such as ALT, CTRL, TAB, etc.

but...

How do you send "q" or "a" ? I tried Send ( "Q" ); and the same for A, but they did not work. Sorry for the newbie question:) I hope to learn how to use this program. Thanks.

<{POST_SNAPBACK}>

do try what they've suggested, send it to a notepad window to test... but, you might care that "Q" is different than "q". "Q" sends shift+q... If you're sending to something that cares, it might matter.

"I'm not even supposed to be here today!" -Dante (Hicks)

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