Reputation: 401
I would like to change the GUI to transparent when the window is not active.
Upvotes: 1
Views: 470
Reputation: 401
Add this in the beginning of the code:
OnMessage(0x06, "WM_ACTIVATE") ;TRIGGER FUNCTION WHEN WINDOW'S ACTIVE STATUS IS CHANGED
Add this function to your code:
WM_ACTIVATE()
{
IfWinActive, MyWindow
WinSet, Transparent, 255, MyWindow ; TRANSPARENCY OFF
else
WinSet, Transparent, 200, MyWindow ; SET TRANSPARENCY BETWEEN 0-255
}
Upvotes: 2