Questions tagged [pyhook]

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.

202 questions
3
votes
0 answers

Move aim CS:GO Python 2.7

Trying to make a simple spray control script for cs:go (for educational purpose) I'm using pyHook to activate a function that moves the mouse in a pattern. It works great outside of cs:go for example in paint but only make the aim lagg for half a…
x5fs3f
  • 31
  • 1
  • 2
3
votes
0 answers

Pyhook and pywin32 modules on 64 bit

I have been trying to install pyhook and pywin32 on my 64 bit windows 7 for python 3.5. I cannot seem to find the correct files, as any that i try either do not work, or work only on 32 bit. Does anyone have a link to recent versions that would work…
Vladamir
  • 247
  • 1
  • 3
  • 11
3
votes
2 answers

Windows startup with pyw file doesn't close cmd

I've been working on a small script that's supposed to run in the background of my computer. I already have the script working and everything except one thing that hours of google searching and hunting have not found the answer to. The file has a…
JustDucky
  • 132
  • 1
  • 10
3
votes
1 answer

I want to stop pythoncom working

I was writing a code about keylogging by pyHook. The following codes are example: import pythoncom as pc, pyHook as ph def KeyboardHook(event): print chr(event.Ascii) return True hm = ph.HookManager() hm.KeyDown =…
Eray Erdin
  • 2,633
  • 1
  • 32
  • 66
3
votes
1 answer

Unable to install pyhook and pywin32

I'm tring to install pyhook and pywin32, but it can not find python 3.3 which I is installed (and so is 2.7) in the registry. Thats all it really tells me, I'm using Windows 7 with AMD64 bit CPU.
user2483829
  • 29
  • 1
  • 9
3
votes
3 answers

Freeze when using tkinter + pyhook. Two event loops and multithreading

I am writing a tool in python 2.7 registering the amount of times the user pressed a keyboard or mouse button. The amount of clicks will be displayed in a small black box in the top left of the screen. The program registers clicks even when another…
Thorbjorn
  • 317
  • 2
  • 8
2
votes
2 answers

pyHook stops receiving Key press events (randomly)?

I have a program that captures all key presses using pyHook, then runs a few functions. I notice that after a while (of random duration), the program was stop receiving key triggers, even though I am pressing keys? Is pyHook unstable? I'm not…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
2
votes
0 answers

pywinhook crashes tkinter window

I create a new thread and run the hook, but when I try to do something with the mouse or keyboard on the window, it does not respond and crashes, I've been trying for a long time, but I couldn't find a solution. import threading import pyWinhook as…
user13154996
2
votes
0 answers

Pyhook wait until keyup

I found this code on here somewhere and I would like to make it to stop printing until the key pressed is up again. I made it wait for a different key in order to print again but then if I had to type something like "Google" it would only print…
Deadmeat
  • 29
  • 3
2
votes
4 answers

Unable to install Pyhook Python 3.8.1

I'm trying to install Pyhook on Python 3.8.1via pip install Pyhook but I keep receiving this error message: ERROR: Could not find a version that satisfies the requirement pyhook (from versions: none) ERROR: No matching distribution found for…
FyXs_Xeno
  • 73
  • 1
  • 1
  • 5
2
votes
0 answers

Pyhook crashes when it tries to interpret the window name as ASCII

Context: I am developing a mouse and keyboard listener with PyHook. Experience in python: Beginner Python interpreter: 3.7 Problem: When I move the mouse over the header Google Chrome browser and the current website is Spotify, I am getting the…
sergioMoreno
  • 189
  • 1
  • 15
2
votes
0 answers

Python Does Not Detect Keystrokes When Some Windows Have Focus

I am trying to capture keystrokes sent to a MapleStory private server I created in order to train a neural network, but the below code does not detect any key strokes when the game window has focus. If any other window has focus, it works fine. I…
Shawn
  • 21
  • 1
2
votes
1 answer

python: key combinations such óíúéáöïò with pyhook

I'm learning about pyhook as keylogger and coding some examples. I dont know how to log key sequences like óíúö because the result thats something like this -> ´´i´´o anyone knows how to solve this issue ? thx you.
dennis
  • 21
  • 1
2
votes
0 answers

How to disable/enable the ctrl+alt+delete combinations key using pyhook?

I have referred this link and disabled some of the combination keys but I am unable to disable ctrl+alt+del. Please let me know if it is possible to disable using pyhook or any other alternative solution using python code.
Kumar R
  • 29
  • 2
2
votes
0 answers

pyHook library Pyhook.PumpWaitingMessages returns nothing

So, I've been trying to play with this a little, and I have this next bit of code def KeyboardEvent(event): global log log.append(chr(event.Ascii)) print log return True hooks_manager = pyHook.HookManager() hooks_manager.KeyDown =…
Ido Kadosh
  • 81
  • 8
1
2
3
13 14