 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
thinkstorm
Joined: 17 Aug 2004 Posts: 18
|
Posted: Tue Aug 17, 2004 7:15 pm Post subject: make Window invisible |
|
|
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
____________________________
| Code: | !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 |
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Aug 17, 2004 7:34 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|