asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.44k stars 1.26k forks source link

Roadmap: Click Relative to Window Rather Than Screen #334

Open chrstophr-wltrs opened 5 years ago

chrstophr-wltrs commented 5 years ago

I am probably the last person to define what is difficult or easy when it comes to coding, so I apologize if I come off as ignorant or entitled.

The main reason I came over was to ask about the roadmap. I've got this project that I'm working on, and it'd be handy to be able to send clicks based on window resolution, rather than absolute position within the screen.

AutoHotkey has something similar, Coordmode screen which is the present default for autogui and coordmode window, which is similar to the roadmap feature win.clickrel. I'm wondering, has that feature been finished? I can't find word either way anywhere. If it has, how do I implement it? If it hasn't, is it being developed? Is there anything I-- an utter layman-- can do to help?

ulises-c commented 3 years ago

I have the same issue. I was thinking of using a combination of pyautogui and pywinauto.

Xarlos89 commented 3 years ago

Pyautogui can handle screen resolution by using pyautogui.getWindowsWithTitle(title), and then calling width() and height(). You can also call size() and get (width,height)