Jump to content
Sign in to follow this  
Dieuz

Click time

Recommended Posts

How can I retrieve the pressed time of a left mouse click?

Ex:

I keep the left mouse click pressed for 5 secondes, how can I retrive this information?

I tried this but it doesnt work:

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    
    If _IsPressed("01", $dll) = 1 Then
        $Start = TimerInit()
        Do
            sleep(1)
        Until _IsPressed("01", $dll) = 0
        
        $End = TimerDiff($Start)
        ConsoleWrite($End)
    EndIf
WEnd
DllClose($dll)
Edited by Dieuz

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  

×
×
  • Create New...