Dini Posted August 29, 2016 Share 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. Link to comment Share on other sites More sharing options...
mikell Posted August 29, 2016 Share 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 Link to comment Share on other sites More sharing options...
l3ill Posted August 29, 2016 Share 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 Link to comment Share on other sites More sharing options...
jguinch Posted August 31, 2016 Share 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 Link to comment Share on other sites More sharing options...
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