Jump to content

Trouble issuing ctrl+c to copy text


johngu
 Share

Recommended Posts

I wrote a very simple script to attempt to copy text from an open notepad (with text in it). While the ctrl+a seems to be received correctly (I see all the text in the notepad highlighted), no text is copied to the clipboard (when I issue ctrl+v by hand, nothing is pasted). Any thoughts? Sorry if this is a very newbie question - it just seems weird. Also, I don't want to use the GetText command because ctrl-c works with more control types, which is ultimately my goal. Thanks in advance for the help.

$title = "Untitled - Notepad"

Sleep(100)

ControlSend($title, "", 15, "^a")

Sleep(100)

ControlSend($title, "", 15, "^c")

Sleep(100)

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