mouse

how to make program stop with a hotkey (outside the console)

how to make program stop with a hotkey (outside the console) Question: I made an autoclicker and i can stop it by pressing b but only at the right timing. I didn’t find anything that would allow me to stop the program by pressing a button at any time without accessing the console Here’s the …

Total answers: 1

How to get the x and y coordinates of mouse in tkinter?

How to get the x and y coordinates of mouse in tkinter? Question: from tkinter import * def customMouse(e=None): x = e.x y = e.y label.place_configure(x=x,y=y-20) root = Tk() label = Label(master=root,text="^") label.place(x=0,y=0) root.bind(‘<Motion>’,customMouse) root.mainloop() My problem is simple: When I use e.x or e.y this returns the x and y coordinates of the mouse …

Total answers: 1

Pygame mouse position not precise enough to rotate the 3D scene

Pygame mouse position not precise enough to rotate the 3D scene Question: I need to rotate a 3D scene or a character using the mouse position: for example, if I move the mouse to the right, I want to turn to the right / the character should turn right. I’ve seen lots of games place …

Total answers: 1

python – fastest way to click mouse

python – fastest way to click mouse Question: I’m trying to make an auto click bot in python using pyautogui but this takes too much time (it runs in a loop, and xPos/yPos changes every time). What faster ways are there? Thanks for helping. pyautogui.PAUSE = 0.001 pyautogui.click(xPos,yPos,button = ‘left’) Asked By: Itay Tsuk || …

Total answers: 3

How to use PyAutoGUI to detect RGB values

How to use PyAutoGUI to detect RGB values Question: I’m trying to build a small bot that clicks only certain colours. I believe pyautogui.displayMousePosition() should display the position of my mouse as well as the RGB values of the pixel the mouse is on. Instead, I’m only seeing the positional values (seen in the screenshot). …

Total answers: 3

Python DirectInput Mouse Relative Moving act not as expected

Python DirectInput Mouse Relative Moving act not as expected Question: I found solution to emulate mouse movement by DirectInput. Point is to use python script to navigate character in 3D Game. That means that have to use relative mouse movement. Everything was working but when i try calculate relationship between x Units (in MouseMoveTo function) …

Total answers: 2

Get mouse deltas using Python! (in Linux)

Get mouse deltas using Python! (in Linux) Question: I know that Linux gives out a 9-bit two’s complement data out of the /dev/input/mice. I also know that you can get that data via /dev/hidraw0 where hidraw is your USB device giving out raw data from the HID. I know the data sent is the delta …

Total answers: 4

Simulate Mouse Clicks on Python

Simulate Mouse Clicks on Python Question: I’m currently in the process of making my Nintendo Wiimote (Kinda sad actually) to work with my computer as a mouse. I’ve managed to make the nunchuk’s stick control actually move the mouse up and down, left and right on the screen! This was so exciting. Now I’m stuck. …

Total answers: 8

Which is the easiest way to simulate keyboard and mouse on Python?

Which is the easiest way to simulate keyboard and mouse on Python? Question: I need to do some macros and I wanna know what is the most recommended way to do it. So, I need to write somethings and click some places with it and I need to emulate the TAB key to. Asked By: …

Total answers: 5

Controlling mouse with Python

Controlling mouse with Python Question: How does one control the mouse cursor in Python, i.e. move it to certain position and click, under Windows? Asked By: Sasha || Source Answers: Linux from Xlib import X, display d = display.Display() s = d.screen() root = s.root root.warp_pointer(300,300) d.sync() Source: Python mouse move in 5 lines of …

Total answers: 18