fabianenos Posted March 28, 2008 Share Posted March 28, 2008 (edited) how do i make a hotkey only work inside my app? so far i have been using this: HotKeySet("^a", "HotKey_MakeLocal"); Ctrl+a Func HotKey_MakeLocal() If WinActive("GUI_title") Then ;Rest of the code EndIf EndFunc but then Ctrl+a wont work in other apps. how do i make it work in my app to do what i want as well as in other apps to do what they were set to do? Edited March 28, 2008 by fabianenos Link to comment Share on other sites More sharing options...
weaponx Posted March 28, 2008 Share Posted March 28, 2008 You need whats known as a key accelerator:http://www.autoitscript.com/forum/index.php?showtopic=66650 Link to comment Share on other sites More sharing options...
fabianenos Posted March 28, 2008 Author Share Posted March 28, 2008 the GUISetAccelerators is not working. the compiler says that it is an invalid command. any clue to why this is happening. i am using version 3.2.10.0 while looking in the manual i found a way of unsetting hotkeys for a while and i tried this and it worked. HotKeySet("^a", "HotKey_MakeLocal") Func HotKey_MakeLocal() If WinActive("GUI_title") Then ; rest of the code Else HotKeySet("^a") Send("^a") HotKeySet("^a", "HotKey_MakeLocal") EndIf EndFunc Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted May 4, 2008 Share Posted May 4, 2008 @fabianenos i know this post is a month old... You will need 3.2.11.3 (beta and higher) to use that function another way is for example (70 = F1) If _IsPressed("70") And WinActive("Program Title") Then Function() But it could be detected as a keylogger Best regards,Emiel Wieldraaijer 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