swe20144 Posted November 2, 2013 Share Posted November 2, 2013 Hi Guys Any idea why this code doesnt work?HotKeySet("{LCTRL}{LCTRL}", "ShowMessage") ;Control pressed twice I want to run some code when the user presses the control key twice. Thanks Sam Link to comment Share on other sites More sharing options...
AlmarM Posted November 2, 2013 Share Posted November 2, 2013 What about increasing a counter to check the amount of times you pressed it? Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
swe20144 Posted November 2, 2013 Author Share Posted November 2, 2013 Even this doesnt work: HotKeySet("{LCTRL}", "ShowMessage") ;Control pressed twice Link to comment Share on other sites More sharing options...
AlmarM Posted November 2, 2013 Share Posted November 2, 2013 If you look here, you will see that CTRL cannot be bound using HotKeySet(). Try _IsPressed from Misc.au3. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
swe20144 Posted November 2, 2013 Author Share Posted November 2, 2013 Theres a windows application that is able to do it, http://www.hotkeyutility.com/ Thats why I was wondering how to do it in my autoit script. Link to comment Share on other sites More sharing options...
AdamUL Posted November 2, 2013 Share Posted November 2, 2013 (edited) You could also have a look at the >HotStrings UDF, it may work for what you are trying to do. As AlmarM mentioned, you can use _IsPressed as shown in the help file. Adam Edited November 2, 2013 by AdamUL Link to comment Share on other sites More sharing options...
AlmarM Posted November 2, 2013 Share Posted November 2, 2013 Again, _IsPressed will check if a key is pressed. I think you want this. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. 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