ken82m Posted March 6, 2009 Share Posted March 6, 2009 I've never noticed this before, I'm just wondering if anyone else has seen this or if it's a Windows 7 thing. I've set several hotkeys and while the script is running those keys won't function in any other application. Thanks, Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
Marlo Posted March 6, 2009 Share Posted March 6, 2009 yup its always done that. Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
ken82m Posted March 6, 2009 Author Share Posted March 6, 2009 hmm well that's annoying lol Other apps can have keys that only apply to themselves when active. Would be a nice parameter I think "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
ken82m Posted March 6, 2009 Author Share Posted March 6, 2009 Found something, hotkeys only function while window is active and keys continue to function elsewhere.http://www.autoitscript.com/forum/index.ph...2&hl=hotkey "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
James Posted March 7, 2009 Share Posted March 7, 2009 Simple solution: HotKeySet("{F1}", "_MyFunc") $GUI = GUICreate("Hotkey Form", 260, 213, 193, 125) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch WEnd Func _MyFunc() If WinActive($GUI) Then MsgBox(0, "", "This message will only be shown if the AutoIt GUI is active!") EndFunc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Robjong Posted March 7, 2009 Share Posted March 7, 2009 (edited) Simple solution: HotKeySet("{F1}", "_MyFunc") $GUI = GUICreate("Hotkey Form", 260, 213, 193, 125) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch WEnd Func _MyFunc() If WinActive($GUI) Then MsgBox(0, "", "This message will only be shown if the AutoIt GUI is active!") EndFunc That will only get the function to work when the window is active but the same hotkeys in other apps will still be blocked, also you need to do that for every function that has a hotkey. When HotKeySet sets a hotkey it is not bound to a GUI so you will have to manage that yourself. You can use the $WM_ACTIVATEAPP msg to set the hotkeys when the window is active and unset them when it goes inactive. Global Const $WM_ACTIVATEAPP = 0x001C GUIRegisterMsg($WM_ACTIVATEAPP, "_HotKeysActive") ; register func for msg, the registered func will be called when the GUI gaines or looses focus Global $hMyGUI = GUICreate(...) Func _HotKeysActive() If WinActive($hMyGUI) Then HotKeySet("!{F4}", "_Exit") HotKeySet("{F1}", "_Help") Else HotKeySet("!{F4}") HotKeySet("{F1}") EndIf EndFunc ;==>_HotKeysActiveoÝ÷ Ø è¶«¢b¢x¬BzÐqé^«h®Æ®¶sdvÆö&Âb33c¶×uTÒuT7&VFRâââ¢ââà¤vÆö&Âb33c¶ÖVçTWBÒuT7&VFTÖVçTFVÒâââ £²b33c¶ÖVçTWBæBb33c¶ÖVçTVÇ&RæFÆW2FòuT6öçG&öÇ0¤FÒb33c¶uTô66VÅF&ÆU³%Õ³%ÒÒµ²gV÷C²b333·´cGÒgV÷C²Âb33c¶ÖVçTWEÒŲgV÷C·´cÒgV÷C²Âb33c¶ÖVçTVÇÕФuT6WD66VÆW&F÷'2b33c¶uTô66VÅF&ÆR If you use koda to design your GUI look for HotKey in the Object Inspector (tool) window and then at the bottom of your GUI script after generating And if your help file is an executable you can use GUISetHelp for the Help HotKey (F1) Hope that explaines it a bit Edited March 7, 2009 by Robjong 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