Jump to content
Sign in to follow this  
Moongoddess

Run pogram/function with a mouse click

Recommended Posts

Moongoddess

I am setting up a program and want to minimize user actions. I would like to make it so when the user presses the primary button of the mouse, it runs a particular function; and when the secondary button is pressed it runs another function. I do not want people moving the mouse around. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
JohnOne

Hi, and welcome aboard the forums :)

Heres how they dont work.

A member tells what he wants, and someone writes the code for them.

Heres how they do work.

A member tries to write the code for what they want, if (alas) it dosent work, that member posts the code and people willing to help (who are in abundance) see if they can put member on the correct path.

Have a pop, I'm sure you will do fine.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
Moongoddess

I am not looking for someone to write a code for me. What I would like is for someone to tell me the name of what might work. I've looked at MouseClick but that is not the feature that I want. I've looked at ControlClick but I do not understand what it is suppose to do, I try to type the command and it does nothing. I have scoured hundreds of functions names and I am unable to figure out which one to use. All I am asking for is a point in the right direction.

Share this post


Link to post
Share on other sites
JohnOne

Hundereds eh?

Did you happen upon _IsPressed()

So for instance

If _IsPressed("01") Then ; primary mouse has been clicked

_SuperFunctionGo()

EndIf

You should post your code, when you can as I guarantee, you will get help much quicker.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
somdcomputerguy

Check out the _IsPressed() and _MouseTrap() functions in the Misc Management subsection of the User Defined Functions Reference in the Helpfile.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Moongoddess

_IsPressed appears to be what I want, Thank You!

I'm going to work on it for a bit and see if I can get it to do what I want :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.