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
1
vote
0 answers
Changing a language in the middle of a python program
I have a program which processes text using pyhook.
Since I also use Hebrew I tried seeing what will happen if I type in Hebrew. It seems like if when the program starts the PC is on Hebrew also if I change my language it will understand it as…

Isdj
- 1,835
- 1
- 18
- 36
1
vote
1 answer
Python keylogger: an integer is required
I am trying to make a keylogger that sends text to a webserver. Using pyHook, and httplib2, I was able to successfully make them work separately. However, when I try to combine the two, I get the error:
An integer is required
I honestly have no…

Prynok
- 13
- 4
1
vote
1 answer
Program give import error if I ran outside of PyCharm
In Pycharm CE I imported the project like this:
|- MyFramework
|- __init__.py
|- AutomationFramework
|- __init__.py
|- File_1.py
|- MainClass.py
and file_1 contends:
import AutomationFramework.MainClass as MainClass
def…

MrAnderson
- 11
- 3
1
vote
3 answers
Python error when installing package using wheel files
I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error:
pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform.
I got the wheel file from this…

TheBumpper
- 55
- 1
- 5
1
vote
0 answers
Why my little keylogger is not sending some of the emails?
I've wrote a simple keylogger that sends an email every 500 keys pressed. And its working. But It's not reliable, sometimes the email is sent, but sometimes not. Lets say, I press a key 1500 times, this should be 3 mails with 500 keys logged. But I…

Jeflopo
- 2,192
- 4
- 34
- 46
1
vote
1 answer
Pyhook: using KeyboardEvents and MouseEvents together
I'm making a screenshot utility for personal use and I want to add in bounding box screenshots. I want to be able to press insert on the 2 corners of the area and then grab the screenshot.
The issue is that I can't get the keyboard and mouse events…

Margamel
- 11
- 4
1
vote
3 answers
Runtime error in Python
I was playing around with info I can get from key presses and mouse events in python and everything seems to work except when I quit the program I get this error.
runtime error R6031 - Attempt to initialize the CRT more than once. This indicates a…

preezzzy
- 598
- 5
- 23
1
vote
1 answer
pythoncom.Pumpmessages in python
I'm writing little keylogger in python. Here is my code.
LOG_FILENAME = 'keylog.txt'
def OnKeyboardEvent(event):
logging.basicConfig(filename=LOG_FILENAME,
level=logging.DEBUG,
…
user1870343
1
vote
1 answer
Detecting key combinations using pyhook
I am currently using pyhook to capture keys using the hook manager's KeyDown event. This allows me to capture all single keys pressed on the keyboard.
However, I haven't been able to find a way to capture key combinations. For example, the event…

John Lyon
- 83
- 1
- 1
- 6
1
vote
3 answers
Python threading with pyhook
import win32api
import win32console
import win32gui
import pythoncom, pyHook , sys, time , os , threading
import shutil ,socket ,datetime
from ftplib import FTP
from threading import Thread
def fi():
while True:
dr = …

user2137297
- 21
- 1
- 7
1
vote
1 answer
Using own code in pyhook pumpmessages
i want to check if the file in which i am writing the keys is more than 2Kb . If it is more than 2KB then i need to make another file and stop writing in this one. I am a beginer in python please help me this. Please indicate where can i use the…

user2137297
- 21
- 1
- 7
1
vote
1 answer
win32api & pyhook - How to get the user's typing language?
I installed pyHook and successfully attached handlers to keyboard events, but now I need to find out whether the user is typing in English layout or other layouts. I couldn't find this information in the event objects.
How do I find on windows what…

Oren
- 2,767
- 3
- 25
- 37
1
vote
1 answer
Pyhook stops capturing key events after 6 presses
I wrote a script to move the mouse around when a key is pressed using pyHook. The problem is that after 6 key press events the script stops picking up key presses and needs to be ended from task manager.
I am using python 2.7 on a Windows 7…

andrewmh20
- 180
- 1
- 13
0
votes
1 answer
Freezes window created with wxPython, if use pyHook
This code works fine, however when I press minimize or close button, program window freezes on some time. The reason may be in the HookMouse, without it, window minimize and close fine. Why?
import wx
import pyHook
class myFrame(wx.Frame):
def…

Ambyte
- 556
- 5
- 11
0
votes
0 answers
How to fix training error in yolov5 image classification
[enter image derror in Training YOLOv5sescription here](https://i.stack.imgur.com/gwGjA.png)
I am working on a capstone project about image classification, and I have followed the instructions from the YOLOv5 website. However, I am still facing some…