jacky998877 3 Posted February 5 Share Posted February 5 (edited) While 1 $minmax_state =WinGetState("TechPowerUp GPU-Z 2.52.0") if $minmax_state == 7 Then ToolTip("maximized and in the background",0,0) elseif $minmax_state == 15 Then ToolTip("maximized and in the foreground",0,0) elseif $minmax_state == 21 Then ToolTip("minimized to the tray",0,0) EndIf WEnd the return value of this window is weired, it is not correspondent to the help file,in the help file the value is 16$WIN_STATE_MINIMIZED (16) = Window is minimized but this window returns 21 ,but when i try to set it toWinSetState("TechPowerUp GPU-Z 2.52.0","",21) it will not minimize , neither wil i set it to WinSetState("TechPowerUp GPU-Z 2.52.0","",16) Edited February 5 by jacky998877 Link to post Share on other sites
Developers Jos 2,852 Posted February 5 Developers Share Posted February 5 (edited) 21=16+4+1 So the window has those 3 states. Ensure you are send the state to the correct window as there could be multiple windows with that same title. Edited February 5 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
ioa747 105 Posted February 5 Share Posted February 5 try this and play with "TechPowerUp GPU-Z 2.52.0" win While 1 $minmax_state = WinGetState("TechPowerUp GPU-Z 2.52.0") ConsoleWrite( "WinGetState = " & $minmax_state& @CRLF) Sleep(1000) WEnd Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 2 minutes ago, Jos said: 21=16+4+1 So the window has those 3 states. yeah , i think so Link to post Share on other sites
ioa747 105 Posted February 5 Share Posted February 5 (edited) @Jos I saw you caught me Edited February 5 by ioa747 Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 3 minutes ago, ioa747 said: try this and play with "TechPowerUp GPU-Z 2.52.0" win While 1 $minmax_state = WinGetState("TechPowerUp GPU-Z 2.52.0") ConsoleWrite( "WinGetState = " & $minmax_state& @CRLF) Sleep(1000) WEnd i tried your code , still 21 Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 6 minutes ago, Jos said: 21=16+4+1 So the window has those 3 states. Ensure you are send the state to thebcorrect window as there could be multiple windows with that same title. there is only one window has that name Link to post Share on other sites
Developers Jos 2,852 Posted February 5 Developers Share Posted February 5 Just now, jacky998877 said: there is only one window has that name how did you check this? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 1 minute ago, Jos said: how did you check this? task manager Link to post Share on other sites
Developers Jos 2,852 Posted February 5 Developers Share Posted February 5 (edited) That are processes not Windows! Edited February 5 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 Just now, Jos said: That are processes not Windows! um........when i minimize and maximize the window, the tooltip will change its state, that is how i know it is the corresponding window Link to post Share on other sites
Developers Jos 2,852 Posted February 5 Developers Share Posted February 5 (edited) Ok... I ve downloaded that util and this seems to work fine for me: #RequireAdmin $minmax_state = WinGetState("TechPowerUp GPU-Z 2.52.0") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $minmax_state = ' & $minmax_state & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console WinSetState("TechPowerUp GPU-Z 2.52.0", "", @SW_MINIMIZE So... you need to send @SW_MINIMIZE (6) to it with WinSetState(). Edited February 5 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 7 minutes ago, Jos said: Ok... I ve downloaded that util and this seems to work fine for me: #RequireAdmin $minmax_state =WinGetState("TechPowerUp GPU-Z 2.52.0") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $minmax_state = ' & $minmax_state & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console WinSetState("TechPowerUp GPU-Z 2.52.0","",@SW_MINIMIZE) it worked, thx Link to post Share on other sites
jacky998877 3 Posted February 5 Author Share Posted February 5 12 minutes ago, Jos said: Ok... I ve downloaded that util and this seems to work fine for me: #RequireAdmin $minmax_state = WinGetState("TechPowerUp GPU-Z 2.52.0") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $minmax_state = ' & $minmax_state & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console WinSetState("TechPowerUp GPU-Z 2.52.0", "", @SW_MINIMIZE So... you need to send @SW_MINIMIZE (6) to it with WinSetState(). magical 👍 Link to post Share on other sites
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