Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Program prevents mouse movement

I have a click bot for a game and haven't used it for a while. I installed it new(maybe there was a new version) and my bot isn't working anymore. It seems like the event is somehow blocked when the game is activated.

I activate the game, with this:

shell=win32com.client.Dispatch("Wscript.Shell")
success = shell.AppActivate("Game)

I tried 2 methods to move the mouse:

win32api.SetCursorPos((x,y)) 

That gives me this error.

pywintypes.error: (0, 'SetCursorPos', 'No error message is available')

The other method is:

nx = int(x*65535/win32api.GetSystemMetrics(0))
ny = int(y*65535/win32api.GetSystemMetrics(1))
win32api.mouse_event(win32con.MOUSEEVENTF_ABSOLUTE|win32con.MOUSEEVENTF_MOVE,nx,ny)

which doesn't work and doesn't give me an error message.

When the game window is not activated, the cursor moves without a problem.

Does anybody know a workaround for this?

Edit: I am using Microsoft Windows 8.1

like image 548
a.j. tawleed Avatar asked Nov 29 '14 00:11

a.j. tawleed


People also ask

Can companies detect Mouse Jiggler?

They can't detect a device that physically moves your mouse around, though, or that moves the scenery under your optical mouse (like an analog clock with a second hand).

How can I stop mouse movement?

Click on the Mouse under the Devices and Printers. In the Mouse Properties window, navigate to the Pointer Options tab. In the Motion section, uncheck the box left to Enhance pointer precision, which controls the mouse acceleration in Windows. Unchecking it will disable the mouse acceleration.

Is Mouse Jiggler software detectable?

Can Mouse Jiggler be detected? The computer sees it as a mouse pointer. Therefore, it can not be detected by an employer monitoring system. However, it could be detectable if somebody can monitor what you install on your computer.

How do I minimize Mouse Jiggler?

To minimize Mouse Jiggler to the system tray, click the button marked with a green, down-pointing arrow. If you want to start the Mouse Jiggler with jiggling already enabled, run the MouseJiggle.exe with either the -j or --jiggle command-line switch.


2 Answers

I tried out ctypes and that works:

ctypes.windll.user32.SetCursorPos(x, y)
like image 138
a.j. tawleed Avatar answered Nov 06 '22 21:11

a.j. tawleed


Not to grave dig old threads, but I ran into this. Try running your script as admin so if your running in CMD make sure you open it as administrator. It worked for me, very simple. I was using python, and windows 10.

like image 43
Teddy Avatar answered Nov 06 '22 21:11

Teddy