Jump to content

Copy a word in PDF to clipboard with one mouse clicked?


Recommended Posts

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

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

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