1

Hi so i'm trying to move my cursor on screen using the smooth_move function from the AutoPy module.

My screen resolution is 1920x1080

But when i execute this code, autopy.mouse.smooth_move(1700, 0)

I get the following Error

ValueError: Point out of bounds

I did a little testing and found out that if i set 1250 as the x variable in the smooth_move function, it moves the cursor towards the end of my screen.

Hurh??? Shouldn't the x variable be 1920 since that's my monitors resolution????

SunAwtCanvas
  • 1,261
  • 1
  • 13
  • 38
  • Did you check the result of `autopy.screen.size()`? There might be a difference between the points and the pixels on the screen due to scaling. Disclaimer: I never worked with `autopy`, so this is a guess based on the information in the documentation. – Matthias Apr 15 '20 at 20:03
  • @Denise, how much u set for cam w * h? – SaddamBinSyed Jun 18 '20 at 16:10

1 Answers1

0

Use autopy.screen.scale()

scale = autopy.screen.scale()
autopy.mouse.smooth_move(1700 / scale, 0 / scale)
lastdrv
  • 21
  • 4