Jump to content

Recommended Posts

Posted (edited)

hey all, Ok, trying to make something that gets the Active Window, and turns it invisible and revisible

HoyKeySet("{PGDN}", "Invisible")

While 1
Sleep(1000)
Wend

Func Invisible()    
    Local $list = WinList()
    For $i = 1 to $List[0][0]
        If WinActive($List[$i][0]) Then 
            $trans = _WinGetTrans($List[$i][0])
            WinSetTrans($list[$i][0], "", $Trans-5)
        EndIf
    Next
EndFunc 

Func _WinGetTrans($sTitle, $sText = "")
    Local $hWnd = WinGetHandle($sTitle, $sText)
    If Not $hWnd Then Return -1
    Local $aRet = DllCall("user32.dll", "int", "GetLayeredWindowAttributes", "hwnd", $hWnd, "ptr", 0, "int_ptr", 0, "ptr", 0)
    If @error Or Not $aRet[0] Then Return -1
    Return $aRet[3]
EndFunc ; _WinGetTrans()

For some reason, when i push the hotkey, it makes the window more transparent, but it doesn't stop and just keeps on going to invisible, then it resets itself and slowly fades invisible once again. etc. etc.

Any idea why?

EDIT: Should probly say that the '_WinGetTrans' Function only works for Windows XP, I found it posted by Valik

Edited by Paulie

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...