minimize/maximize my gui when a window is min/max Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
OCP
Posts: 98
Joined: 28 Mar 2018, 19:28

minimize/maximize my gui when a window is min/max

01 May 2018, 19:25

hello i need some help or pointers

my gui has a lot program specific buttons, for the last 2 days i have tried to get my gui to follow the program i use in when i minimize maximize that window but i cant figure it out

i tried using winget minmax WinWaitActive WinWaitNotActive WinRestore, i tried to set a timer on winget

but reality is this is all above my head i cant piece it together i was hoping for some pointers

thank you
Last edited by OCP on 26 Jul 2018, 22:37, edited 1 time in total.
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: minimize/maximize my gui when a window is min/max  Topic is solved

01 May 2018, 20:06

Hi OCP,

The +Owner GUI option has the advantage of being simple to implement but will actually minimize/restore the GUI when the owner is minimized/restored, respectively. Maybe this meets your needs. Example with notepad:

Code: Select all

#NoEnv


WinWait, ahk_class Notepad
WinGet, ID, ID, % ahkid:="ahk_id " . WInExist() ;  ; if all parameters are omitted, WinExist returns the ID of the Last Found Window, if it still exist; yet, WInWait sets the Last Found Window
Gui +Owner%ID% ; make the GUI owned by the window whose ID is the one stored in the variable 'ID'
WinWaitActive % ahkid
Gui, Show, w400 h400 NoActivate
return
my scripts
OCP
Posts: 98
Joined: 28 Mar 2018, 19:28

Re: minimize/maximize my gui when a window is min/max

01 May 2018, 20:22

interesting that looks fairly simple ill play with this tomorrow

thank you
Last edited by OCP on 26 Jul 2018, 22:37, edited 1 time in total.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: jeves, mikeyww and 144 guests