Sivaro Posted May 30, 2011 Share Posted May 30, 2011 I'm a newbie and want to know that AutoIT can do this task against PDF file? While user read text using Acrobar Reader and move cursor to a word then click on that word(english). Can AutoIT automatically capture that word and put it into clipboard? (without manually select that word by user) Or anyone knows there is an already written script, please let me know. Thanks. Link to comment Share on other sites More sharing options...
JoHanatCent Posted May 30, 2011 Share Posted May 30, 2011 I'm a newbie and want to know that AutoIT can do this task against PDF file? While user read text using Acrobar Reader and move cursor to a word then click on that word(english). Can AutoIT automatically capture that word and put it into clipboard? (without manually select that word by user) Or anyone knows there is an already written script, please let me know. Thanks. Do you mean like this? #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(25) If _IsPressed("11", $dll) And _IsPressed("01", $dll) Then ; Ctrl key and Left Mouse Button Sleep(25) MouseClick("left") Send("^c") MsgBox(0, "ClipBoard", ClipGet()) EndIf WEnd DllClose($dll) Link to comment Share on other sites More sharing options...
Sivaro Posted May 30, 2011 Author Share Posted May 30, 2011 (edited) Do you mean like this? #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(25) If _IsPressed("11", $dll) And _IsPressed("01", $dll) Then ; Ctrl key and Left Mouse Button Sleep(25) MouseClick("left") Send("^c") MsgBox(0, "ClipBoard", ClipGet()) EndIf WEnd DllClose($dll) Thanks for a reply. By the way, I don't see the code which do extract the word at the cursor pointing (that word is not explicitly selected via mouse drag). however, I will test your script and let you know. .... Yes, It worked like a charm! Thank you, JoHanatCen. I think I need to study AutoIT more to understand how it worked. Thanks again. Edited May 30, 2011 by Sivaro Link to comment Share on other sites More sharing options...
JoHanatCent Posted May 30, 2011 Share Posted May 30, 2011 Thanks for a reply.....Yes, It worked like a charm! Thank you, JoHanatCen. I think I need to study AutoIT more to understand how it worked.Thanks again.You are welcome!BUT remember F1 = Help is your friend! 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