antonio
antonio

Reputation: 11110

Identify windows in AutoHotkey like AutoIt

In AutoIt one can identify a window by both its title and class. For example, to wait 10 seconds for a window to become active:

WinWaitActive("[TITLE:My Window; CLASS:My Class", "", 10)

Can I specify the name of the executable too? What is the equivalent in AutoHotkey? With title only, it would be:

WinWaitActive, My Window 

and, with class only, it would be:

WinWaitActive, My Window, ahk_class My Class

Also, there is a ahk_exe Process Name criterion for the executable names.

Upvotes: 0

Views: 103

Answers (1)

Schneyer
Schneyer

Reputation: 1257

As stated in the docs, you can use multiple criteria.

WinWaitActive, My Window ahk_class MyClass ahk_exe ProcessName, , 10

Just make sure to specify the title first and have exactly one space between the different parts.

Upvotes: 1

Related Questions