Sign in to follow this  
Followers 0
ChillFacToR032

Is there a way to listen for mouse clicks?

5 posts in this topic

How can I listen for mouse clicks in AutoIt?

Share this post


Link to post
Share on other sites



Well you can use the GUIGetMsg() if it is detecting clicks inside your GUI.


Regards,Josh

Share this post


Link to post
Share on other sites

Its not inside a GUI...

What if I wanted to keep a count of how many times the left mouse button was clicked in a certain time interval?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

_IsPressed

but put a do...until loop right after so it doesn't count it like a hundred times

like this:

$count = 0

While 1

If _IsPressed(01,$dll) Then

$count +=1

Do

Sleep(100)

Until Not( _IsPressed(01,$dll))

EndIf

Wend

just add a timer and your ready to go =D

(not tested though)

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

Thanks, _IsPressed was the one i was looking for

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