I'm trying to make an AHK script that will let me change how transparent a window is.
This script works, but it randomly decides to mess up.
CapsLock & WheelDown::
{
WinGetActiveTitle, cwindow
WinGet, tp, Transparent, %cwindow%
tp := tp-10
WinSet, Transparent, %tp%, %cwindow%
Return
}
CapsLock & WheelUp::
{
WinGetActiveTitle, cwindow
WinGet, tp, Transparent, %cwindow%
tp := tp+10
WinSet, Transparent, %tp%, %cwindow%
Return
}
Rwin & LWin::
{
WinGetActiveTitle, cwindow
WinSet, Transparent, Off, %cwindow%
Return
}
That is my script.
The problem is sometimes when ever I change active windows and then push the capslock and scroll down, it makes the active window completely transparent.
I just want it to drop the transparency by 10.
Is there a different way I can do this to make it work better?
What I am wanting to achieve is:
When I hold down the capslock and scroll down, decrease the transparency of the active window by 10.
When I hold down the capslock and scroll up, increase the transparency of the active window by 10.