jollypk

Strange behavior with Pynput

7 posts in this topic

#1 ·  Posted

This is strange behaviour with python pynput. When I am running a listener for mouse and keyboard activities, Autoit is not able to send the correct keys. Like Send("^c",0) is sent as "c" only.

Does anyone know of way out from here?

 

Thanks

Share this post


Link to post
Share on other sites



#3 ·  Posted

It should be Ctrl+C as in Copy command.

Share this post


Link to post
Share on other sites

#4 ·  Posted

This works for me.

Sleep(3000) ; Within the first 3 secs of running the script, place the cursor before the first of the two words that you wish to copy.
Send("^+{Right 2}") ; Select text
Send("^c") ; Copy selected text
MsgBox(0, "Copied", ClipGet())

 

Share this post


Link to post
Share on other sites

#5 ·  Posted

Thanks.

I have to select a cell in excel, so I used the excel's script of .Select

It doesn't work with that. Also, did u test the above with pynput listeners On? I know that this forum is not for pynput, but this is an integration issue.

Share this post


Link to post
Share on other sites

#6 ·  Posted

2 hours ago, jollypk said:

...  Also, did u test the above with pynput listeners On? ....

No

Share this post


Link to post
Share on other sites

#7 ·  Posted

I abandoned the pynput package. No problems with core libraries.

 

Thanks Guys

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