Activate window, set focus

Syntax

act [window]

 

Parts

window - top-level window (activate) or child window (set focus).

 

Remarks

If window is omitted, activates previous window. If window cannot be activated, generates run-time error.

 

If used as function, act activates window and returns window handle.

 

Tips

If act does not work properly, try to check "Disable Windows foreground lock feature" in Options.

 

Examples

act "Notepad" ;;activate "Notepad" window
act "+IEFrame" ;;activate window with class name "IEFrame"
act ;;activate next window
act win(100 200) ;;activate window from point (100, 200 pixels of the screen)
act id(142 "Calc") ;;activate (set focus) "Calc" child with id = 142