This works well for the primary monitor on my Windows 10. It auto dims the primary monitor when it becomes inactive.
I'm trying to make the script fully dim the far left monitor whenever it's inactive, while the center monitor is the primary one ( I have 3 monitors-left,centre,right ).
And I've seen Skrommel's updated script to this: https://www.autohotkey.com/board/topic/4288-ghoster-put-a-transparent-image-across-your-screen/
But for some reason, it permanently dims the monitor, even when it's active. I messed around the settings and it didn't change anything except how transparent the grey cover is over the screen.
Back to the original, 2005 DimInactive by @skrommel
I changed/add a few numbers to try to make this happen (like replaced 0's for x axis with -1920 (to move the dark cover -1920 pixels over to the left monitor from the center primary monitor))..its close.. it dims my far left monitor when it's inactive, EXCEPT for the task bar area (even if the taskbar is hidden). What would I change to make it dim everything including the taskbar area?
Code: Select all
Gui,+Owner +AlwaysOnTop -Disabled -SysMenu -Caption
Gui, Color, 000000
Gui,Add,Picture,X-1920 Y0 W%A_ScreenWidth% H%A_ScreenHeight% gCLICK,
Gui,Show,NoActivate X-1920 Y0 W%A_ScreenWidth% H%A_ScreenHeight%,WINDOW
WinSet,Transparent,255,WINDOW
LOOP:
Sleep,100
WinGetActiveStats,wint,winw,winh,winx,winy
winw+=winx
winh+=winy
If winx<-1920
winx=-1920
If winy<0
winy=0
If wint=
{
winx=-1920
winy=1080
winw=%A_ScreenWidth%
winh=%A_ScreenHeight%
}
WinSet,Region,0-0 %A_ScreenWidth%-1920 %A_ScreenWidth%-%A_ScreenHeight% 1080-%A_ScreenHeight% 0-0 %winx%-%winy% %winw%-%winy% %winw%-%winh% %winx%-%winh% %winx%-%winy%,WINDOW
WinSet,Top,,WINDOW ; Rem this line to keep the task bar visible
Goto,LOOP
CLICK:
WinSet,Bottom,,WINDOW
CoordMode,Mouse,Screen
MouseGetPos,mousex,mousey,mousewin
MouseClick,Left,%mousex%,%mousey%
MouseClick,Left,%mousex%,%mousey%
WinSet,AlwaysOnTop,On,WINDOW
Return