Script for auto minimizing window when focus lost Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
PaleOgre
Posts: 3
Joined: 21 Jan 2018, 12:01

Script for auto minimizing window when focus lost

21 Jan 2018, 12:19

Hello, is there a script that makes a window automatically minimize when the focus is lost after alt-tabbing? It would be mostly helpful if it worked on my browser window (Firefox) but, a global setting to minimize all windows other than the one which has focus would be great too. Thanks!
PaleOgre
Posts: 3
Joined: 21 Jan 2018, 12:01

Re: Script for auto minimizing window when focus lost

26 Jan 2018, 11:35

This does not perform the minimizing of windows AUTOMATICALLY upon exiting a window. Thanks anyway smart arse.
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: Script for auto minimizing window when focus lost  Topic is solved

26 Jan 2018, 22:48

Code: Select all

#NoEnv
#Warn
; Windows 8.1 64 bit - Autohotkey v1.1.27.04 32-bit Unicode


var := true
SetTimer, subroutine, -1
return

subroutine:
WinWaitNotActive, ahk_exe firefox.exe
sleep, 100
if (var) {
	WinMinimize
	SetTimer, subroutine, -1
}
return

!t::SetTimer, subroutine, % (var:=not var) ? -1 : "Off" ; ALT+T disable/enable the behaviour
!x::ExitApp ; ALT+X terminates the script
my scripts
PaleOgre
Posts: 3
Joined: 21 Jan 2018, 12:01

Re: Script for auto minimizing window when focus lost

27 Jan 2018, 01:00

Now that's what I'm looking for!! Thank you so much for this ^^

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest, Bing [Bot], gabelynn1, JoeWinograd, Tech Stuff and 145 guests