Jump to content

Send("^A") not working


palindrome
 Share

Recommended Posts

The following code was intended to select all text in untitled notepad. It didn't have the intended effect. In fact, it just made a beep/chime sound. I got the same problem even when I used Send("{CTRLDOWN}A{CTRLUP}") instead. What's wrong? How can I fix it? This is actually just a test program. The real problem happened in a DirectX game, where I am also trying to send ctrl-a.

Opt("SendKeyDelay", 100)

Opt("SendKeyDownDelay", 100)

WinWaitActive("Untitled - Notepad")

Sleep(300)

Send("^A")

MsgBox(0, "Done", "")

Link to comment
Share on other sites

The following code was intended to select all text in untitled notepad. It didn't have the intended effect. In fact, it just made a beep/chime sound. I got the same problem even when I used Send("{CTRLDOWN}A{CTRLUP}") instead. What's wrong? How can I fix it? This is actually just a test program. The real problem happened in a DirectX game, where I am also trying to send ctrl-a.

Opt("SendKeyDelay", 100)

Opt("SendKeyDownDelay", 100)

WinWaitActive("Untitled - Notepad")

Sleep(300)

Send("^A")

MsgBox(0, "Done", "")

Maybe you need not set SendKeyDelay, I used to send "^v" in a Dx game, I only set "SendKeyDownDelay" then it got worked.

And also, you may try ^a but not ^A, in some programmes ^A actually equals to ctrl+shift+a.

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