How-to: toggle app foreground/minimize

Share your favorite FastKeys commands
Post Reply
averebazmadar
Posts: 18
Joined: Jul 30th, ’20, 08:24

Post by averebazmadar » Sep 20th, ’23, 09:23

What I would like to achieve:

on shortcut presses:
1. run program
2. move the running program to the foreground
3. send back to tray/minimize/background

My main goal is to send it to the foreground but if it is possible, it would be awesome to toggle the app foreground/minimize. Even if it needs a new shortcut.
User avatar
Marko
Posts: 1814
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 20th, ’23, 18:24

A simple script (Type: Command) using Chrome window as an example:

Code: Select all

Run, Chrome
Sleep 3000
WinActivate, ahk_class Chrome_WidgetWin_1
Sleep 3000  
WinMinimize, ahk_class Chrome_WidgetWin_1
averebazmadar
Posts: 18
Joined: Jul 30th, ’20, 08:24

Post by averebazmadar » Sep 23rd, ’23, 15:31

Well, that was simple indeed, thanks :D
Post Reply