scotty Posted August 26, 2006 Share Posted August 26, 2006 Hello all, I have a question about calling minimizing a window using WinSetState and @SW_MINIMIZE. Certain applications do not seem to minimize to the taskbar. Instead, they minimize to a little title-bar thingy that floats above the task bar. This happens whenever I try to minimze PSPad (and some others). Has anyone seen this or have any idea what I'm doing wrong? Thanks for the help! We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see. Link to comment Share on other sites More sharing options...
Valuater Posted August 26, 2006 Share Posted August 26, 2006 You mean like this???? #include<guiconstants.au3> WinMinimizeAll() $Dummy_win = GUICreate("") $win = GUICreate("My GUI", -1, -1, -1, -1, -1, -1, $Dummy_win) GUISetState() sleep(5000) GUISetState(@SW_MINIMIZE, $win) Sleep(5000) 8) Link to comment Share on other sites More sharing options...
scotty Posted August 26, 2006 Author Share Posted August 26, 2006 Yep, that's exactly what is happening. I'm using WinSetState($title, "", @SW_MINIMIZE) and not GUISetState(@SW_MINIMIZE, $win), and I'm calling it on an existing window (not one I opened using AutoIt). We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see. Link to comment Share on other sites More sharing options...
scotty Posted August 26, 2006 Author Share Posted August 26, 2006 Ah, I see now. I'm getting the title of the current active window by calling $title = WinGetTitle("") and $title is getting set to the child window, not the parent. Two questions: 1) Is there any way to get to the parent window? 2) Is there any way to tell if I have the child window? We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see. Link to comment Share on other sites More sharing options...
ivan Posted August 26, 2006 Share Posted August 26, 2006 Valuater's example provided above should illustrate it. #include<guiconstants.au3> WinMinimizeAll() $Dummy_win = GUICreate("") $win = GUICreate("My GUI", -1, -1, -1, -1, -1, -1, $Dummy_win) GUISetState() sleep(5000) GUISetState(@SW_MINIMIZE, $win) Sleep(5000) here $Dummy_win is the handle to the dummy window and $win is the handle of dummy's child. to get to the parent window just use that handle, say GUISetState(@SW_MINIMIZE, $Dummy_win) and to do stuff on the child use the child's handle GUISetState(@SW_MINIMIZE, $win) I think Window handles are unique during a windows session, so they are much more reliable than using window titles. You could always have 2 windows with the same title, but each has its own unique handle. Hope it helped. IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
scotty Posted August 26, 2006 Author Share Posted August 26, 2006 I think I may still be missing something. I'm not actually creating the window I'm trying to minimize. I'm calling WinGetTitle("") to get the name of the active window and am trying to minimize that one. Apparenly, WinGetTitle() is sending me the name of child window. I don't know how to get the name of the parent window from there. Thanks for all the help! We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see. 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