Jump to content

Sending Keystrokes


Guest endlessly
 Share

Recommended Posts

Guest endlessly

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.

Link to comment
Share on other sites

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.
Link to comment
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)

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...