Sign in to follow this  
Followers 0
Sivaro

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

4 posts in this topic

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.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Sivaro

Share this post


Link to post
Share on other sites

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!


Share this post


Link to post
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
Sign in to follow this  
Followers 0