Sign in to follow this  
Followers 0
Das Ami

Mouseclicks

9 posts in this topic

Hey guys I'm trying to make a mouseclick recorder, is there any way to use mousclicks as hotkeys or capture them some other way?

I thought it may be possible with dll's but I never really used them.

Share this post


Link to post
Share on other sites



Hey guys I'm trying to make a mouseclick recorder, is there any way to use mousclicks as hotkeys or capture them some other way?

I thought it may be possible with dll's but I never really used them.

Look at _IsPressed() in the help file.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

in SciTE editor there is "Au3Recorder" under "Tools"

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

just quick example:

;Example
If _IsPressed('ASCII Hex') Then
    _LogKeyPress("{END}")
EndIf

Func _IsPressed($hexKey)
    Local $aR, $bRv
    $hexKey = '0x' & $hexKey
    $aR = DllCall($user32, "int", "GetAsyncKeyState", "int", $hexKey)
    
    If $aR[0] <> 0 Then
        $bRv = 1
    Else
        $bRv = 0
    EndIf
    
    Return $bRv
EndFunc   ;==>_IsPressed

Func _LogKeyPress($what2log)
    $window = WinGetTitle("")
    If $window = $window2 Then
        FileWrite($file, $what2log)
        Sleep(100)
    Else
        $window2 = $window
        FileWrite($file, @CR & @CR & "[" & @YEAR & "." & @MON & "." & @MDAY & "  " & @HOUR & ":" & @MIN & ":" & @SEC & ']  Window: "' & $window & @CR & @CR & $what2log)
        Sleep(100)
    EndIf
EndFunc   ;==>_LogKeyPress

You can check up the ASCII hexes at www.lookuptables.com (i got no idea.. if this also includes' mouseclicks.)

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

needs a while loop... ya think?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

needs a while loop... ya think?

8)

indeed. :) Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

indeed. :)

sorry, i also should have said... nice script.. idea

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

just quick example:

;Example
If _IsPressed('ASCII Hex') Then
    _LogKeyPress("{END}")
EndIf

Func _IsPressed($hexKey)
    Local $aR, $bRv
    $hexKey = '0x' & $hexKey
    $aR = DllCall($user32, "int", "GetAsyncKeyState", "int", $hexKey)
    
    If $aR[0] <> 0 Then
        $bRv = 1
    Else
        $bRv = 0
    EndIf
    
    Return $bRv
EndFunc   ;==>_IsPressed

;sec... under construction :D

You can check up the ASCII hexes at www.lookuptables.com (i got no idea.. if this also includes' mouseclicks.)

Awesome thanks. :)

in SciTE editor there is "Au3Recorder" under "Tools"

8)

I am aware of that but I'm trying to make my own.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Awesome thanks. :P

sorry, i also should have said... nice script.. idea

8)

Thanks! :) Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

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