Jump to content

Recommended Posts

Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...