Using AutoIt to click a button on a window

Apprentice Programmer picture Apprentice Programmer · Jun 4, 2013 · Viewed 41.2k times · Source

Which function should I use in order to click a pop button after running a program? For example, the league of legends launcher button is what I want to simulate the click.

Answer

Mikaël Mayer picture Mikaël Mayer · Jun 5, 2013

You can use either MouseClick if you know the coordinates of where to click:

MouseClick("left", x, y)

Or you can use ControlClick to click on a specific button:

ControlClick("Window title", "", "[classname provided by AutoitINFO]")