Jump to content

the return value of this window is different than that is in the help file


Recommended Posts

 

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
Link to comment
Share on other sites

  • jacky998877 changed the title to the return value of this window is different than that is in the help file
  • Developers

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

Link to comment
Share on other sites

  • Developers
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 comment
Share on other sites

  • Developers

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

Link to comment
Share on other sites

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 comment
Share on other sites

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 comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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