Dini Posted August 29, 2016 Posted August 29, 2016 Hi, 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 : ShellExecute("Perfmon.exe") WinWaitActive("Performance Monitor") ;Clcking on the window using x and y co-ordinates to set the focus MouseClick("primary", 120, 384) Send("da") Problem : I am unable to set the Focus on the launched Perfmon window Please help me out on this.
mikell Posted August 29, 2016 Posted August 29, 2016 WinWaitActive returns the handle of the window, so use it to activate the window $hWnd = WinWaitActive("Performance Monitor") ;.... WinActivate($hWnd) but Send is not very nice, you might use the AutoIt Info Tool to check the controls so you can directly act on them
l3ill Posted August 29, 2016 Posted August 29, 2016 FYI - as windows go Focus and Activate mean the same thing... ...you should not need to Set the Focus if you use Mikell's code. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
jguinch Posted August 31, 2016 Posted August 31, 2016 @Dini : please, explain us what you are trying to do. Maybe there is another way to do it.. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now