Not Applicable
Not Applicable

Reputation: 45

pyautogui issue with Pystray

Having issue with pyautogui and pystray. Using python Version 3.6.4.
Simply importing both modules into the same script and calling any pyautogui function produces an error. Is there a fix to this or a work around?? I simply want to use the functionality of pyautogui and build a program which resides in the system tray.

import pyautogui
import pystray

pyautogui.moveTo(10,10)

expected LP_POINT instance instead of pointer to POINT

Upvotes: 4

Views: 191

Answers (1)

Al Sweigart
Al Sweigart

Reputation: 12969

I'm the creator of PyAutoGUI. Thanks for bringing up this issue, I've put in a fix in version 0.9.53 that fixes this. This probably also fixes compatibility issues with other modules, so I'm glad you brought this up.

The details are: PyAutoGUI recreated its own POINT struct which was identical to the one in ctypes.wintypes, but for some reason this was causing problems when another module used ctypes.wintypes.POINT, so I changed PyAutoGUI to use the wintypes one instead.

Upvotes: 2

Related Questions