Jump to content
Sign in to follow this  
tengwer

Ctrl-shift click

Recommended Posts

tengwer

I want to be able to click on a word in a document and have an event fired when I release the left mouse button but only when pressing ctrl-shift along with it. I tried this but it doesn't work:

_MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT, "Click")

Sleep(5000)

_MouseSetOnEvent($MOUSE_PRIMARYUP_EVENT) ;Enable mouse button back.

Func Click()

;MsgBox(0,"","")

If _IsPressed(11, $dll) Then

Sleep(200)

If _IsPressed(10, $dll) Then

MsgBox(0,"","")

EndIf

EndIf

EndFunc

Func Close()

Exit

EndFunc

While 1

Sleep(250)

WEnd

I used the msgbox just to see if it works. In reality I would call another function at this point. FYI I am looking to call that function after the mouse button is released while pressing ctrl-shift and not when it is pressed.

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.