AutoHotkey Community

It is currently May 24th, 2012, 2:20 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: make Window invisible
PostPosted: August 17th, 2004, 7:15 pm 
Offline

Joined: August 17th, 2004, 7:05 pm
Posts: 38
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 17th, 2004, 7:34 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], jsquard, maraskan_user, RaptorX and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group