Page 1 of 1

Getting the classNN from Window Spy and passing it to ControlClick

Posted: 11 Sep 2019, 05:20
by siyamsajeebkhan
Hi, I was using WindowSpy to get the classNN of a button in an application to pass that classNN to ControlClick to click on a specific button. But it is not working.

classNN: Button2
Text: OK

But when I am trying

Code: Select all

WinGetActiveTitle, Title
ControlClick, Button2, %Title%
It's not working. What can be the reason?

Re: Getting the classNN from Window Spy and passing it to ControlClick

Posted: 13 Sep 2019, 19:31
by divanebaba
Hello and welcome to the AHK-forum :)

Try following code:

Code: Select all

WinGetActiveTitle, Title
Control, Check,, Button2, %Title%