Christopher Blue Posted May 30, 2006 Share Posted May 30, 2006 I am trying to send a mouse click with a modifier key (ctrl, alt, shift, etc.) held down but using Send("{modkey down}") doesn't seem to be working. Link to comment Share on other sites More sharing options...
gamepin126 Posted May 30, 2006 Share Posted May 30, 2006 (edited) expandcollapse popup;~ VK_BACK (08) ;~ BACKSPACE key ;~ VK_TAB (09) ;~ TAB key ;~ VK_CLEAR (0C) ;~ CLEAR key ;~ VK_RETURN (0D) ;~ ENTER key ;~ VK_SHIFT (10) ;~ SHIFT key ;~ VK_CONTROL (11) ;~ CTRL key ;~ VK_MENU (12) ;~ ALT key ;~ VK_PAUSE (13) ;~ PAUSE key ;~ VK_CAPITAL (14) ;~ CAPS LOCK key #include <Misc.au3> While 1 If _IsPressed("11") Then Clickity() ; Ctrl is pressed If _IsPressed("1B") Then Quit() WEnd Func Clickity() MouseClick("left") EndFunc Func Quit() Exit EndFunc Edited May 30, 2006 by gamepin126 Link to comment Share on other sites More sharing options...
Christopher Blue Posted May 30, 2006 Author Share Posted May 30, 2006 So I should use Send("{ctrl down}") then use that code to wait for it to take effect? Link to comment Share on other sites More sharing options...
gamepin126 Posted May 30, 2006 Share Posted May 30, 2006 If you hold it down it'll be pressed repeatedly, or do you want it to be able to click and hold click? Link to comment Share on other sites More sharing options...
Christopher Blue Posted May 30, 2006 Author Share Posted May 30, 2006 Basically I want to ctrl-left click the screen. Like if I held down ctrl and clicked the left mouse button. Link to comment Share on other sites More sharing options...
Emperor Posted May 30, 2006 Share Posted May 30, 2006 I'm guessing this should work Send("{CTRLDOWN}") MouseClick("left", 0, 0) Send("{CTRLUP}") Link to comment Share on other sites More sharing options...
Christopher Blue Posted May 30, 2006 Author Share Posted May 30, 2006 (edited) Hm, I have been trying Send("{CTRL down}") and Send("{CTRL up}"). I will try what you put, emperor. Edited May 30, 2006 by Christopher Blue Link to comment Share on other sites More sharing options...
Emperor Posted May 30, 2006 Share Posted May 30, 2006 (edited) Strange it works for me when I use {CTRLDOWN} and {CTRLUP} but not when I use {CTRL DOWN} and {CTRL UP}. Edited May 30, 2006 by Emperor Link to comment Share on other sites More sharing options...
Christopher Blue Posted May 30, 2006 Author Share Posted May 30, 2006 Aye, me too. But CTRLDOWN and CTRLUP work! Thanks, Emperor. Link to comment Share on other sites More sharing options...
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