Sign in to follow this  
Followers 0
Danyfirex

call Function with MouseUp

3 posts in this topic

hi mate, It's me again with one of my foolish questions.

how can I make to run a function when my mouseclick is down or up.

Share this post


Link to post
Share on other sites



Most elegant solution would be a mouse hook, but since hook related stuff is a hot topic, _IsPressed will do as well:

#include <Misc.au3>
$LMBState = 0
While 1
    $LMBPressed = _IsPressed(01)
    If $LMBState = 0 And $LMBPressed Then ; key down and $LMBState = 0 --> Button pressed
        $LMBState = 1

        ConsoleWrite("Down" & @CRLF)

    ElseIf $LMBState And $LMBPressed = 0 Then ; key not pressed, but $LMBState = 1 --> Button released
        $LMBState = 0

        ConsoleWrite("Up" & @CRLF)

    EndIf
WEnd

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite

Share this post


Link to post
Share on other sites

Thank you very much qsek, good Code. It's just I need. thank you. ;)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0