pyHook is a python wrapper for global input hooks in Windows. Specifically it wraps the Windows SetWindowsHookEx API function using low-level keyboard (WH_KEYBOARD_LL) and mouse (WH_MOUSE_LL) hooks.
Questions tagged [pyhook]
202 questions
0
votes
1 answer
why does pythoncom.pumpmessages() stop working?
so I am writing a program that is logging keystrokes and it works great until I click away from the program's box. when i clicked on like cortana a browser and started typing, it logged a few strokes then completely stopped. It also didn't throw…

J leong
- 285
- 5
- 13
0
votes
1 answer
Windows Python get data from Clipboard. Clipboard returns previously copied word
I am using pyhook to detect when user presses Control + C.
Then I get the data copied from the clipboard using win32clipboard api.
The problem I am facing is that the code returns the last copied data not the current one.
Is it because it takes time…

fortytwo
- 1
0
votes
1 answer
How to quit using python script pyhook use shortcut keys?
This is , I intend to do a can automatically pasted into the chat window and click with the mouse to send a small script.
However, this script can only run up until after running can stop.
My question is how you can set a shortcut key ( such as F12…

梁文豪
- 39
- 3
0
votes
2 answers
Install pyHook 3.5
I started coding with python about a month or so ago, and I've only just recently started using other modules within my code. I want to use pyHook for one of my projects. However, I've had no luck at finding a version of pyHook for python 3.5. There…

thatoneguy245
- 121
- 1
- 6
0
votes
1 answer
PyHook mouse event
I wrote a small program in Python, which executes the function "go" when I press the left mouse button. My intention however is to execute go only while I hold LMB. If I release LMB it should cancel "go". Finally when canceld or successfully…

Stefan B
- 541
- 2
- 6
- 13
0
votes
1 answer
time.sleep (got type NoneType)
So I have been working on a very basic 'fastclick macro'. I want the program to click more if I click faster than around 5 clicks per second. When it reaches the limit of 5 clicks per second, i want it to click in between your last and your next…

Jan-Paul Mosterdijk
- 25
- 5
0
votes
1 answer
loosing button control in kivy in combination with pyhook
I have a small recorder application in kivy which should control screen capture activity. The recorder app should present a status line and a recording / pause button depending on the status of the recorder. The initial sequence is: Waiting (i.e.…

Bill Bridge
- 821
- 1
- 9
- 30
0
votes
2 answers
Python TypeError an integer is required pyHook pythoncom
I wrote a script:
import pythoncom, pyHook
import time
from time import strftime,localtime
def OKBE(event):
log =str("log "+str(time.strftime("%d,%B",localtime()))+".txt")
f=open(str(log),"a")
…

Blood
- 13
- 1
- 8
0
votes
2 answers
Pyhook UTF-8 issue
I'm making a python app that triggers an action when the print screen key is pressed. I'm using pyhook library. However, every time I press a character written with the language of my country (ãíé and others) is doubling the characters . For example…

user3553966
- 319
- 1
- 3
- 7
0
votes
0 answers
hooking the keyboard in multiple threads - pyhook and threading
Im trying to capture a set of words from the keyboard
and run a coresponding command to each word.
Each thread looks for a different word.
For some reason although both threads are running only one word is captured.
import pythoncom, pyHook, os,…

jackLantern
- 21
- 4
0
votes
1 answer
Py2EXE compiled pyhook binary error
I was compiling some python script using pyhook and pythoncom. The build was successfully after notifying that there is missing module named _cpyHook from pyHook.cpyHook. When i start the .exe file it returns this import error.
Traceback (most…

Mohan Rex
- 1,674
- 2
- 17
- 22
0
votes
2 answers
Python: How can I have a script write to a file when it's run then stay open to write on a keypress?
I'm trying to write a script that when I run it, it will write the current time to a file, then I want it to stay open running in the background so that any time I press the Insert key it will write the current time to the file minus 7 minutes.
I…

Jeremiah Crowell
- 77
- 6
0
votes
2 answers
My script does not delete the last char
I've got a very long script so I will sum it up.
LOG_TEXT is where all the chars are stored and the data goes there through Key strokes, so every time a user types a key on the keyboard, it goes to LOG_TEXT.
Eventually, the LOG_TEXT is saved in…

Mike
- 37
- 6
0
votes
1 answer
Python import error on compiled binary?
I'm trying to distribute a python app which uses pyHook I used cx_Freeze to make a compiled binary. The orginal python project works flawlessly while in .py form. But the compiled binary from cx_freeze just terminates after giving this Traceback:
…

Amol Borkar
- 2,321
- 7
- 32
- 63
0
votes
1 answer
Need help for my keylogger program python
I'm new to Python. I'm writing a key-logger program.
I wrote this:
#!/usr/bin/python
import pythoncom , pyHook , time, smtplib
LOG = open("C:\LOG.txt", "a")
LOG.write("")
LOG.close()
_time = time.strftime(" %A, %d, %B, %Y, %H : %M ")
_time1…

iampirla
- 35
- 1
- 1
- 11