R
R
raynoldoff2021-08-20 00:25:59
Python
raynoldoff, 2021-08-20 00:25:59

How to automatically activate the mouse on Windows startup?

Hey! Help me please. Script with mouse movement in python.

The essence of the script: after starting the computer, the script is activated, it takes control of the mouse and clicks on all the necessary icons, and then enters passwords through the keyboard. The script itself works perfectly, but there is one BUT.

Problem: for the script to work correctly, the mouse must be active, i. the cursor should be visible. After starting the computer, if you do not move the mouse with your hands, the cursor will not appear. Made the process pyautogui.moveTo(100,100, duration=1) through pyautogui - did not help. Even if you set the cursor movement time, the process will still not work, because the mouse is inactive, and it is activated only under mechanical action. How to make the cursor immediately visible when you start the computer?

PS If the cursor is not moved mechanically, then no commands related to the mouse on pyautogui will work at all - neither mouse movement, nor mouse search for certain pictures on the screen.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-08-20
@Vindicar

Look towards pywinauto. It simulates mouse clicks in a different way, in theory it should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question