Automate clicks and typing on Windows apps without source code?

AI Thread Summary
Creating a program to automate typing and clicking in any Windows application without source code access is feasible and can significantly reduce repetitive tasks. Tools like the KeePassXC Auto-Type feature and various GUI testing frameworks can facilitate this automation. The SendKeys utility is a method to send text to applications, requiring the identification of the application’s process ID (PID) and setting focus on it. It’s important to include pauses between commands to ensure proper execution. For simpler tasks, using command line options provided by the Windows application is recommended. Additionally, AutoHotkey is a popular tool for scripting automation, allowing for the creation of custom scripts to manage tasks efficiently.
kolleamm
Messages
476
Reaction score
44
I want to create a program that can type and click for me on any Windows app without access to the source code. This would save a lot of time doing boring and repetitive tasks. Is this possible?
 
Computer science news on Phys.org
The Sendkeys utility is one way to send text to another Windows application. I have not used it in a long time. I remember(?) that you can use tasklist to get the application PID. Then set the focus to that PID. Then you need to use sendkeys to send tabs to move to the desired input box. Then use sendkeys to send the desired text. Some pause between sendkeys is needed.

PS. If the Windows app has command line options for what you want, that is probably much simpler.
 
kolleamm said:
Lots of good info here, not sure which one to choose, some seem to require knowing class names but I'll check them out, thanks.
When I was doing a lot of this, I made a small C program that took a command-line text in argv and called sendkeys to send it to the Windows application. Then I used a Perl script to do all the work and logic of getting the PID, calling my C program, and pausing between steps.
 
Back
Top