johngu Posted November 28, 2007 Share Posted November 28, 2007 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 More sharing options...
Thatsgreat2345 Posted November 28, 2007 Share Posted November 28, 2007 (edited) Try increasing the sleep delay between the select all and the copy and so on by the way what is this for? Edited November 28, 2007 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
johngu Posted November 28, 2007 Author Share Posted November 28, 2007 Tried increasing the delays to 1000 ms. Still doesn't work. This is for reading text out of a game's custom control. When I issue ctrl-c normally, this works. But does not through AutoIt. So I tried on a simpler example... Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 28, 2007 Share Posted November 28, 2007 I increased it to 500 in between the control a and control c, with notepad it worked. Does this game happen to have gameguard, or other game hacking prevention integrated? Link to comment Share on other sites More sharing options...
ame1011 Posted November 28, 2007 Share Posted November 28, 2007 $text = WinGetText("Untitled - Notepad", "") MsgBox(0, "Text read was:", $text) [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now