bouncingmolar Posted October 26, 2008 Posted October 26, 2008 (edited) I think I've finally figured out how to check if a user pushes Ctrl-Click... however it can't differentiate between ctrl-click and ctrl-alt-a-b-c-d-....-click.I'd like to only activate the ctrl-Click function only when a specific controlID is ctrl-clicked. Can someone point me in the right direction I can't seem to find it in the help and i must be searching the wrong stuff on the forum. Thanks. eg using madeup function: ControlWaitUserInput ($windowtitle, $ControlID, "{Control} + {Left Mouse Click}")#include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("11", $dll) AND _IsPressed("01", $dll) Then msgbox (1, "ctrl click", "ctrl click") ExitLoop EndIf WEnd DllClose($dll) Edited October 28, 2008 by bouncingmolar
Zisly Posted October 26, 2008 Posted October 26, 2008 Maybe this, haven't tested. #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("11", $dll) AND _IsPressed("01", $dll) And Not _IsPressed("12",$dll) And _IsPressed("11",$dll) Then msgbox (1, "ctrl click", "ctrl click") ExitLoop EndIf WEnd
bouncingmolar Posted October 27, 2008 Author Posted October 27, 2008 Thanks Guys that works ok. How do I get it only to activate when clicking a specific control (not ctrl but a window control) ie if ControlExists If Clicked: {Ctrl} + ({mouse left} only on $ControlID) == Then perform function
bouncingmolar Posted October 28, 2008 Author Posted October 28, 2008 Thanks Guys that works ok.How do I get it only to activate when clicking a specific control (not ctrl but a window control) ie if ControlExistsIf Clicked: {Ctrl} + ({mouse left} only on $ControlID) == Then perform functionI've just reworded my original post slightly because I think I may have lead everyone off the topic. I actually would like to find out how to test whether a ctrl-click has occurred when clicking only a specific controlID. Thanks for the help so far, it was very useful anyhow
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now