Sign in to follow this  
Followers 0
Lyra

How do I receive click?

5 posts in this topic

I tried to write an application that will save the pixel color pointed by the mouse cursor to a file once I click the left mouse button.

Does anybody know any function will capture a mouse click event (like the onMouseClick in Visual C++), so that I can do something like this:

while 1

if is_mouse_click() = true

$pos = MouseGetPos ( )

$color = PixelGetColor ( $pos[0] , $pos[1] )

FileWrite("myFile", $color);

EndIf

WEnd

Or even better is to have something like HotKeySet() [unfortunately HotKeySet doesn't take mouse click as "hot key"].

Thanks,

Share this post


Link to post
Share on other sites



AutoIt doesn't do that... I'd say search for it, but the forum search is less than stellar. The reasons for this involve mouse hooks and fears of people using autoit to hack and make keyloggers/mouse loggers and the resistance to having dll's that need to be installed for use and more...

That's just what I've gathered from the other times people have asked similar questions...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Thanks.

Share this post


Link to post
Share on other sites

you could set a hotkey to get the mouse pos though.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

Good idea, thanks.

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