; ; MonitorDimer ; By mmdoogie ; 23 January 2008 ; ; Overlays a partially-transparent, black, always on top window over my second monitor ; Window is event-transparent, so events are passed to windows below ; Win Numpad+ makes the overlay lighter ; Win Numpad- makes the overlay darker ; Win Numpad* toggles the overlay ; Don't want several of these running ; Add menu items just in case #SingleInstance force Menu, Tray, NoStandard Menu, Tray, Add, Darken, Darken Menu, Tray, Add, Lighten, Lighten Menu, Tray, Add, Toggle, Toggle Menu, Tray, Add, Exit, FinishIt ; Set up some default values transAmount := 128 show := 1 ; Turn on the window ; E0x20 corresponds to WS_EX_TRANSPARENT which makes the window event-transparent Gui, +AlwaysOnTop -SysMenu +Owner -Caption +E0x20 Gui, Color, 000000 Gui, Show, NoActivate x1440 y0 w1440 h900, Overlay MRM GoSub UpdateTrans Return ; Increment the transparency amount #NumpadAdd:: Lighten: transAmount := transAmount + 8 If (transAmount > 255) { transAmount := 255 } GoSub UpdateTrans Return ; Decrement the transparency amount #NumpadSub:: Darken: transAmount := transAmount - 8 If (transAmount < 0) { transAmount := 0 } GoSub UpdateTrans Return ; Update the window transparency amount from the variable UpdateTrans: WinSet, Transparent, %transAmount%, Overlay MRM Return ; Toggle the overlay on or off ; Comes back to whatever level it was at before toggle #NumpadMult:: Toggle: If (show = 1) { Gui, Show, Hide, Overlay MRM show := 0 } Else { Gui, Show, Overlay MRM GoSub UpdateTrans show := 1 } Return ; Get outta here FinishIt: ExitApp