Sign in to follow this  
Followers 0
therks

MouseClick vs ControlClick buttons

5 posts in this topic

So I was experimenting with these two functions (MouseClick and ControlClick) and found that if I had my mouse buttons swapped, then MouseClick behaved as expected (left actually "clicked" the left button bringing up the menu) but ControlClick detected the change, and instead of "clicking" the left button (and activating the menu) it just acted like I clicked the primary button.

So in summary, I had these results:

(MC = MouseClick, CC = ControlClick)

In "Left handed" mode (Left = secondary, right = primary):

MC "Left": Secondary click Expected

CC "Left": Primary click Unexpected

MC "Right": Primary click Expected

CC "Right": Secondary click Unexpected

Not that I'm complaining, but I don't want to rely on this behaviour and then in the future find out it's a bug and it gets changed and my code is all screwey.

I was actually thinking that perhaps we could have the "main" "menu" "primary" and "secondary" button keywords that MouseClick has incorporated into ControlClick, opinions?

Then there'd be no confusion. "Want to bring up the context menu on that button? ControlClick(...'menu')" etc.

Share this post


Link to post
Share on other sites



I can't imagine that being by design.


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

That was my thought.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

i do think however that it would be better to have one function one way and on the other (just in case you NEVER know...) but i think it should be swapped MC should do the correct click command and CC should do the expected command... it would make more sense to me at least that way...

Edited by botanic

Share this post


Link to post
Share on other sites

Personally I think they should both behave the same way, and ideally both be able to use the same aliases for buttons. That way you don't have to read registry settings just to make sure you're doing the expected click on a control.

Do I win for most delayed response time ever? :)

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