Jump to content
Sign in to follow this  
Byteblock

Ctrl+Click Not ControlClick()

Recommended Posts

Byteblock

I've been using AutoIt for a couple of years now, but today I've encountered a problem that I just can't work out.

I'm attempting to issue a Left Control + Left Mouse Button Click. So far I have failed amazingly... including locking up the PC into a loop of continuous Left Control commands (that was fun to trouble shoot).

From what I've read this should do the trick...

Send("{LCTRL DOWN}")
MouseClick("left", $AtPosX, $AtPosY)
Send("{LCTRL UP}")

But alas it does not. Anyone have some suggestions?

Thanks!

Share this post


Link to post
Share on other sites
Byteblock

try mousedown, then Send("{LCTRL DOWN}")

Awesome... the reverse worked! I didn't think to try that since I thought of clicking as doing the same thing, but I guess that minor delay in the commands makes the difference!

Thank you so much!

Share this post


Link to post
Share on other sites
Byteblock

welcome

:)

Oh dear I was a bit hasty in my enthusiasm. Now I can't seem to get out of the control button getting stuck down. I've tried a large series of

UPs and normal sends but nothing seems to get it unstuck besides manually pushing the control key.

Send("{LCTRL DOWN}")
            MouseDown("left")
            Sleep(200)
            MouseUp("left")
            Send("{LCTRL UP}")
            Sleep(200)  
            Send("{LCTRL}")
            Sleep(200)
            Send("{LCTRL}")
            Sleep(200)
            Send("{LCTRL}")
            Sleep(200)
            Send("{LCTRL}")
            Sleep(200)  
            Send("{LCTRL}")
            Sleep(200)
            Send("{LCTRL}")
            Sleep(200)
            Send("{LCTRL}")
            Sleep(200)

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.