Automate clicks and typing on Windows apps without source code?

Click For Summary
SUMMARY

Automating clicks and typing in Windows applications without source code is achievable using tools like AutoHotkey and the SendKeys utility. Users can utilize the tasklist command to obtain the application PID and set focus before sending keystrokes. The KeePassXC Auto-Type feature is also mentioned as a practical example. GUI testing frameworks can facilitate this process, although some may require knowledge of class names.

PREREQUISITES
  • Familiarity with AutoHotkey scripting
  • Understanding of Windows command line utilities, specifically tasklist
  • Basic knowledge of the SendKeys utility
  • Experience with GUI testing frameworks for Windows applications
NEXT STEPS
  • Research AutoHotkey scripting techniques for automating Windows tasks
  • Learn how to use the SendKeys utility effectively in Windows
  • Explore GUI testing frameworks suitable for Windows applications
  • Investigate command line options for specific Windows applications to simplify automation
USEFUL FOR

This discussion is beneficial for software developers, automation engineers, and anyone looking to streamline repetitive tasks in Windows applications without access to source code.

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.
 
  • Like
Likes   Reactions: kolleamm
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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 51 ·
2
Replies
51
Views
7K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 104 ·
4
Replies
104
Views
7K
Replies
7
Views
3K
  • · Replies 26 ·
Replies
26
Views
4K