'Is there a pythonic way to specifc which mouse pointer performs which action when using multiple pointers?

I'm trying to run a script on my PC that uses my mouse while I also use the PC for other tasks.

The script performs regular GUI interactions on one specific monitor, it's interacting with an application with pyautogui

The issue is the mouse snaps to that monitor and I have to drag it back every time and my active window changes.

I've tried a small application "MouseMux" which does give me two pointers if I connect an additional USB mouse but I can't specify which one python uses.

Is there a pythonic way to specify which pointer to use when?

enter image description here enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source