jacky998877 Posted February 5, 2023 Posted February 5, 2023 (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, 2023 by jacky998877
Developers Jos Posted February 5, 2023 Developers Posted February 5, 2023 (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, 2023 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.
ioa747 Posted February 5, 2023 Posted February 5, 2023 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 know that I know nothing
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 2 minutes ago, Jos said: 21=16+4+1 So the window has those 3 states. yeah , i think so
ioa747 Posted February 5, 2023 Posted February 5, 2023 (edited) @Jos I saw you caught me Edited February 5, 2023 by ioa747 I know that I know nothing
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 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
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 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
Developers Jos Posted February 5, 2023 Developers Posted February 5, 2023 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.
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 1 minute ago, Jos said: how did you check this? task manager
Developers Jos Posted February 5, 2023 Developers Posted February 5, 2023 (edited) That are processes not Windows! Edited February 5, 2023 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.
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 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
Developers Jos Posted February 5, 2023 Developers Posted February 5, 2023 (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, 2023 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.
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 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
jacky998877 Posted February 5, 2023 Author Posted February 5, 2023 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 👍
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