sheck Posted January 21, 2006 Share Posted January 21, 2006 (edited) AutoItSetOption("WinTitleMatchMode", 4) $whandle = "handle=" & WinGetHandle("active", "") WinSetState($whandle, "", @SW_HIDE) The above code gets the window handle, but doesn't hide the window at all. I need to hide a window using it's handle or classname and cannot use "active", "last", "" or title of the window to hide it in my program that I'm making, because title and state of windows are variables and handle doesn't change as long as the window is open and that's what I need. So, is there another way to get a window handle or classname. Or maybe there is another way of hiding windows. Edited January 21, 2006 by sheckandar Live and Learn, 'cause Knowledge is Super Power. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 21, 2006 Moderators Share Posted January 21, 2006 (edited) Notice where and how you put the class name: AutoItSetOption("WinTitleMatchMode", 4) $whandle = WinGetHandle("classname=Class", "") Sleep(1000) WinSetState($whandle, "", @SW_HIDE) Sleep(1000) WinSetState($whandle, "", @SW_SHOW) Edit: Forgot a bracket Edited January 21, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
greenmachine Posted January 21, 2006 Share Posted January 21, 2006 ... WinSetState($whandle, "", @SW_SHOW) Don't forget that ). Link to comment Share on other sites More sharing options...
sheck Posted January 21, 2006 Author Share Posted January 21, 2006 Thanks, it worked. Guess manuals are not always accurate. Live and Learn, 'cause Knowledge is Super Power. Link to comment Share on other sites More sharing options...
Sandro Alvares Posted February 3, 2006 Share Posted February 3, 2006 (edited) SmOke_N, is good your source... i try make MSN Messenger is work a class name is IMWindowClassThanks Edited February 3, 2006 by Sandro Alvares Programmer PHP, ASP, CGI, Perl, Delphi, JScript, ......... :) 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