How to click a specific button on a window with autohotkey?

How to click a specific button on a window with autohotkey?

See the AutoHotkey documentation as suggested by @user3419297
https://autohotkey.com/docs/commands/ControlClick.htm

With the window spy, youll be able to find the controls Name/ID. For example, Button2 or Edit1. Then use ControlClick on that control.

ControlClick, Button2, WindowTitle

Most likely youll be able to use the buttons text too. For example, an OK button.

ControlClick, OK, WindowTitle

In both examples given, WindowTitle is where you can put the words that show up in a windows title bar. More can be learned from the documentation.

If the button is not accessible by ControlClick you can try to do an ImageSearch or FindText https://www.autohotkey.com/boards/viewtopic.php?f=6&t=17834

How to click a specific button on a window with autohotkey?

Leave a Reply

Your email address will not be published.