Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

make Window invisible


  • Please log in to reply
1 reply to this topic
thinkstorm
  • Members
  • 40 posts
  • Last active: Sep 10 2014 06:06 PM
  • Joined: 17 Aug 2004
pretty straight forward transparent option for ALT+MiddleClick. I only query the ALT key for exiting, so you can release the Middle Button to make things more easy (and to prevent accidential scrolls with the ScrollWheel)

TC
____________________________
!MButton::
    CoordMode, Mouse, Screen
    MouseGetPos, currentX, currentY, currentWindow
    if currentWindow =
        return
    SetWinDelay, 0 
    WinSet, Transparent, 50, ahk_id %currentWindow%
    Loop
    {
        GetKeyState, state, LAlt, P
        if state = U
            break
    }
    WinSet, Transparent, 255, ahk_id %currentWindow%
return


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I tried it; very nice.

A minor improvement is that you can omit the X and Y output variables if you don't need that info (the help file is wrong, so I changed it to reflect this):
MouseGetPos,,, currentWindow

Also, you might want to throw a "Sleep 10" inside that loop, otherwise it will use quite a lot more CPU time while you're holding down the ALT key.