Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16862

How to fix error when calling activate pygetwindow

$
0
0

I have an array of windows with a specific title. When executing the ".activate()" command to an array from these windows, this error periodically occurs: File "C:\Users\sakan\PycharmProjects\BIC\window_variable.py ", line 10, in cmd_window[0].activate()File "C:\Users\sakan\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygetwindow_pygetwindow_win.py", line 246, in activate__raise With Last Error()File "C:\Users\sakan\AppData\Local\Programs\Python\Python312\Lib\site-packages\pygetwindow_pygetwindow_win.py", line 99, in _raiseWithLastErrorraise PyGetWindowException('Error code from Windows: %s - %s' %(error Code, _formatMessage(ErrorCode)))pygetwindow.PyGetWindowException: Error code from Windows: 0 - Operation completed successfully.It is worth noting that in the window that you are working with, you cannot move the cursor beyond the boundaries of the activated window.

the script is run with administrator rights and via cmd


Viewing all articles
Browse latest Browse all 16862

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>