Jump to content

To set Focus on Windows window

Recommended Posts



I am unable to set the focus on the window, so that i can navigate to next text by sending [sendkeys ("string")]. 

Below is the code, I am using to launch and set focus :

WinWaitActive("Performance Monitor")

;Clcking on the window using x and y co-ordinates to set the focus

MouseClick("primary", 120, 384)

Problem : I am unable to set the Focus on the launched Perfmon window

Please help me out on this.

Share this post

Link to post
Share on other sites

WinWaitActive returns the handle of the window, so use it to activate the window

$hWnd = WinWaitActive("Performance Monitor") 

but Send is not very nice, you might use the AutoIt Info Tool to check the controls so you can directly act on them

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now