Toggling, but also focusing a file/program

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 15th, ’19, 16:10

Hello,

I know that

Code: Select all

WinGet,MinMax,MinMax,Æ
If MinMax=-1
   WinRestore,Æ
else WinMinimize,Æ
Toggles a program, where "Æ" is the name/title of a program/file, however, is it perhaps possible to focus it also? For example when I toggle a Notepad file, it's not focused, and I can't write in it right away.
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Mar 15th, ’19, 17:52

Like this?

Code: Select all

WinGet, MinMax, MinMax, Æ
If (MinMax=-1)
   WinActivate, Æ
else
   WinMinimize, Æ
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Mar 18th, ’19, 14:07

Tom wrote: Mar 15th, ’19, 17:52 Like this?

Code: Select all

WinGet, MinMax, MinMax, Æ
If (MinMax=-1)
   WinActivate, Æ
else
   WinMinimize, Æ
Yeah, exactly. Thanks :)
Post Reply