Guest XoroX Posted March 28, 2004 Share Posted March 28, 2004 (edited) Hey, used the search function on the forums and looked everywhere for some information pertaining to this and couldnt come up with anything. Basically what I want to be able to do is use WinActivate to activate a window based on a handle(hwnd) that i have obtained using WinGetHandle. The reason I am doing this is that I have two instances of the same application running and want to be able to discriminate between the two so that I can be sure of which one I am dealing with. Thanks in advance and if this is in any way unclear please feel free to ask me any questions. Here is a snippet of some general stuff I am trying just to get it to work. AutoItSetOption("WinTitleMatchMode", 4) $handle = WinGetHandle("classname=Notepad") MsgBox(0, "AutoIt", $handle) WinActivate("handle=$handle", "") Edited March 28, 2004 by XoroX Link to comment Share on other sites More sharing options...
Valik Posted March 28, 2004 Share Posted March 28, 2004 WinActivate("handle=" & $handle) Or you ccould add the handle= when you get the handle: $handle = "handle=" & WinGetHandle("classname=Notepad") Link to comment Share on other sites More sharing options...
Guest XoroX Posted March 28, 2004 Share Posted March 28, 2004 Thank you ever so much, worked like a charm. 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