Answer the question
In order to leave comments, you need to log in
Protecting a program from pyautogui?
Playing around with the python library pyautogui. I make the simplest commands: I move the cursor, I click on the buttons, I enter text into text fields. In most cases, everything works correctly, but in some programs it crashes - the mouse cursor moves to the desired coordinates, but the button is not clicked (the program does not perform the actions that it should by clicking on the corresponding button), the text is also not entered. It seems to me that such programs provide some kind of protection against automatic actions. I'm wondering how it works? How can it be bypassed? How to implement it in your program? The only thing that came to mind was "screening out" by delaying the action, but its various options did not work. Another detail I noticed
Answer the question
In order to leave comments, you need to log in
I must say right away that I am not an expert in this, everything that I wrote below may not be reality.
But in theory, your application you're trying to interact with can track API calls to WIN32 functions such as mouse movement, clicks, text input, and so on, and not block such actions in its interface. The mouse and keyboard are not affected as they are HID devices. Some games are even cheated with arduino and other things through HID (usually mouse) emulation, since such a device does not make "suspicious" API calls and the game thinks that the camera is controlled by the mouse.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question