Mouse control

Alexander Vergun vergun.alx at gmail.com
Sun Oct 6 11:11:46 EDT 2019


Hello all,

I am coding a voice assistant under Python 3.7, Windows 7. I am using 
PYcharm and libraries such as PYSimpleGUI, mouse, keyboard etc.  
Everything works except for the mouse control and probably keyboard, the 
problem is following, when I run the script under PYcharm, the script 
can control mouse only within PYcharm editor, but when the other window 
is on the top, the script cannot control the mouse, and the same happens 
when the script runs under the Python console. There is only one way to 
make script control the mouse - I have to manually click on the window 
which was opened by the script only then the script controls the mouse. 
I tried to call win32gui.SetCapture without any effect.

Does anyone have an idea how to handle this? Thank you very much,

Alexander

-- 
Ing. Alexander Vergun
tel.: +421905167381




More information about the Python-list mailing list