Jump to content

Recommended Posts

Posted (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 to
WinSetState("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 by jacky998877
  • jacky998877 changed the title to the return value of this window is different than that is in the help file
  • Developers
Posted (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 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.
  :)

Posted
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 

Posted
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
Posted (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 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.
  :)

Posted
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 👍

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...