BrettF Posted June 27, 2009 Share Posted June 27, 2009 GUISetAccelerators? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
nguyenbason Posted June 27, 2009 Share Posted June 27, 2009 But it works if i use: #Include <HotKey.au3> Global Const $VK_RETURN = 0x0D Global $Edit, $hEdit $GUi = GUICreate('Test', 400, 400) $Edit = GUICtrlCreateEdit('', 10, 10, 380, 380) $hEdit = GUICtrlGetHandle($Edit) GUISetState() _HotKeyAssign($VK_RETURN, 'MyFunc', $GUi , $HK_FLAG_NOBLOCKHOTKEY) Do Until GUIGetMsg() = -3 Func MyFunc() If _WinAPI_GetFocus() <> $hEdit Then Return EndIf ConsoleWrite('OK' & @CR) EndFunc ;==>MyFunc UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
nguyenbason Posted June 28, 2009 Share Posted June 28, 2009 Another question Yashied, When i'm using the above example i have big problem, if i put a msgbox in Func MyFunc() If _WinAPI_GetFocus() <> $hEdit Then Return EndIf Msgbox(0,"","a") EndFunc ;==>MyFunc Then it will auto disapper after 2s. Same for function, the functions will be terminated after 2s. UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
Yashied Posted June 28, 2009 Author Share Posted June 28, 2009 Another question Yashied, When i'm using the above example i have big problem, if i put a msgbox in Func MyFunc() If _WinAPI_GetFocus() <> $hEdit Then Return EndIf Msgbox(0,"","a") EndFunc ;==>MyFunc Then it will auto disapper after 2s. Same for function, the functions will be terminated after 2s.MyFunc() in your case is a function of the interruption to the main program. Need to be crazy to stop the hook procedure. By the way I wrote about this in the UDF. See example 3 as should be done. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
nguyenbason Posted June 28, 2009 Share Posted June 28, 2009 MyFunc() in your case is a function of the interruption to the main program. Need to be crazy to stop the hook procedure. By the way I wrote about this in the UDF. See example 3 as should be done.I got the idea. Thanks UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
KaFu Posted June 29, 2009 Share Posted June 29, 2009 Yashied, great function , thanks a lot for this one! One question, I want to utilize this UDF to capture WIN+F keypress and recover SMF from tray. Works fine, but the key is not consumed, SMF is maximized AND the standard Search Window pops-up. Is there a way to consume the keypress? Global Const $VK_F = 0x46 _HotKeyAssign($CK_WIN + $VK_F, '__func_tray_recover', BitOR($HK_FLAG_NOOVERLAPCALL, $HK_FLAG_NOREPEAT)) Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted June 29, 2009 Author Share Posted June 29, 2009 (edited) The library has been updated.@nguyenbasonIn version 1.6 your problem is solved.@KaFuI have everything works OK. Tell me, this example works for you (with version 1.6)?#Include <HotKey.au3> Global Const $VK_F = 0x46 _HotKeyAssign($CK_WIN + $VK_F, 'MyFunc') While 1 Sleep(10) WEnd Func MyFunc() MsgBox(0, 'Test', 'WIN-F has been pressed!') EndFunc ;==>MyFunc Edited June 29, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted June 29, 2009 Share Posted June 29, 2009 Works now as desired , thanks for the fast response! Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted June 29, 2009 Author Share Posted June 29, 2009 I am glad that you liked my UDF. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Ascend4nt Posted June 29, 2009 Share Posted June 29, 2009 (edited) Yashied, this is an excellent program. I had thought HotKeySet() was using a keyboard hook at first, but after working with your code, I realized - apparently not! In fact, the whole purpose of the _AsyncHotKeySet UDF (rewrite, in my signature) was because certain applications/games were not recognizing the hotkeys I was pressing when set with HotKeySet(). But using your code, no problem - I no longer need _AsyncHotKeySet to poll the status of keys. I think you have an awesome set of features, and I'd hate to bother you for another one - but its definitely something possible to do, it just requires a bit of tinkering around... Anyway, what I was wondering is if you could add the ability to provide a 'hotkey release' message. This is something I added in my _AsyncHotKeySet code, and though its probably a bit less complicated then adding it to your code, it does give you an idea of how it could possibly be done. I'd add another flag to your code, something like '$HK_FLAG_CALLONRELEASE', which would require either that: A.) your code waits for the initial hotkey, just takes note that the hotkey was pressed, and then when it sees the complete hotkey has been released, it calls the given function, or B.) that you call the same function for initial hotkey press, and then on hotkey release. I think A.) would make more sense as you wouldn't want to have two flags causing a required parameter to a function (in B.)'s case, a 'pressed/released' parameter) Even though you might not see it, there's big potential in the hotkey 'release' message. A program can execute a given set of commands *only* after the key is released, or it could execute a set of commands on initial hotkey press and only terminate them when the hotkey is released. This could be useful for a bunch of things, but if I'd have to give an example right off the bat: lets say a gamer wanted to have some activity repeated while a key is held down, and stopped when it's released - this would be the perfect method. Or if they needed something done at precisely the right time - they could hold down the hotkey in anticipation, and release it to have the actual code execute. *edit: Just for clarification: I don't need it for cheats - typically I'll just use cheatcodes or trainers for that . What I have used it for though is grabbing music (setting an app to start recording (& then stop), or even to grab screenshots) Anyway, thanks again for your great work. It's really nice to have Hotkeys that work consistently across the board (unlike HotKeySet) -Ascend4nt Edited June 30, 2009 by ascendant My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
nguyenbason Posted June 30, 2009 Share Posted June 30, 2009 (edited) The library has been updated. @nguyenbason In version 1.6 your problem is solved. @KaFu I have everything works OK. Tell me, this example works for you (with version 1.6)? #Include <HotKey.au3> Global Const $VK_F = 0x46 _HotKeyAssign($CK_WIN + $VK_F, 'MyFunc') While 1 Sleep(10) WEnd Func MyFunc() MsgBox(0, 'Test', 'WIN-F has been pressed!') EndFunc ;==>MyFuncThanks Yashied, Let me try it Edit: Work very very good. Thanks Edited June 30, 2009 by nguyenbason UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
Yashied Posted July 1, 2009 Author Share Posted July 1, 2009 Yashied, this is an excellent program. I had thought HotKeySet() was using a keyboard hook at first, but after working with your code, I realized - apparently not! In fact, the whole purpose of the _AsyncHotKeySet UDF (rewrite, in my signature) was because certain applications/games were not recognizing the hotkeys I was pressing when set with HotKeySet(). But using your code, no problem - I no longer need _AsyncHotKeySet to poll the status of keys. I think you have an awesome set of features, and I'd hate to bother you for another one - but its definitely something possible to do, it just requires a bit of tinkering around... Anyway, what I was wondering is if you could add the ability to provide a 'hotkey release' message. This is something I added in my _AsyncHotKeySet code, and though its probably a bit less complicated then adding it to your code, it does give you an idea of how it could possibly be done. I'd add another flag to your code, something like '$HK_FLAG_CALLONRELEASE', which would require either that: A.) your code waits for the initial hotkey, just takes note that the hotkey was pressed, and then when it sees the complete hotkey has been released, it calls the given function, or B.) that you call the same function for initial hotkey press, and then on hotkey release. I think A.) would make more sense as you wouldn't want to have two flags causing a required parameter to a function (in B.)'s case, a 'pressed/released' parameter) Even though you might not see it, there's big potential in the hotkey 'release' message. A program can execute a given set of commands *only* after the key is released, or it could execute a set of commands on initial hotkey press and only terminate them when the hotkey is released. This could be useful for a bunch of things, but if I'd have to give an example right off the bat: lets say a gamer wanted to have some activity repeated while a key is held down, and stopped when it's released - this would be the perfect method. Or if they needed something done at precisely the right time - they could hold down the hotkey in anticipation, and release it to have the actual code execute. *edit: Just for clarification: I don't need it for cheats - typically I'll just use cheatcodes or trainers for that . What I have used it for though is grabbing music (setting an app to start recording (& then stop), or even to grab screenshots) Anyway, thanks again for your great work. It's really nice to have Hotkeys that work consistently across the board (unlike HotKeySet) -Ascend4ntascendant, I suggest you test the HotKey UDF v1.7 beta. I have defined the $HK_FLAG_POSTCALL flag. See details inside the UDF. Here is a simple example of using this flag. #Include <HotKey_17_beta.au3> Global Const $VK_ESCAPE = 0x1B Global Const $VK_F12 = 0x7B _HotKeyAssign($VK_F12, 'MyFunc', BitOR($HK_FLAG_DEFAULT, $HK_FLAG_EXTENDEDCALL, $HK_FLAG_POSTCALL)) _HotKeyAssign(BitOR($CK_CONTROL, $VK_ESCAPE), 'Quit') While 1 Sleep(10) WEnd Func MyFunc($iKey) If $iKey > 0 Then ConsoleWrite('F12 (0x' & Hex($iKey, 4) & ') pressed!' & @CR) Else MsgBox(0, 'Hot key Test Message', 'F12 (0x' & Hex(Abs($iKey), 4) & ') has been released!') EndIf EndFunc ;==>MyFunc Func Quit() Exit EndFunc ;==>Quit HotKey_17_beta.au3 Remark. There is a basic principle on which based work this library - the next hot key will NOT work until the previous will not be released. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Ascend4nt Posted July 1, 2009 Share Posted July 1, 2009 ascendant, I suggest you test the HotKey UDF v1.7 beta. I have defined the $HK_FLAG_POSTCALL flag. See details inside the UDF. ...Remark.There is a basic principle on which based work this library - the next hot key will NOT work until the previous will not be released.Yashied, thank you for your work, much appreciated. However, just a couple of questions:1. If I were to use a modifier like Ctrl+Alt along with F12, it will send a 'Release' message even if I'm still holding down Ctrl+Alt. Is that the intended behavior, to ignore modifier keys?2. If I hold down Ctrl+Alt+F12, then release Ctrl+Alt, and then press say 'Shift' and finally release F12 (even releasing Shift too), the function never gets the 'Released' message. Same goes for re-pressing Ctrl or Alt, and then releasing all three - the Released message is never sent.Thanks again though!Had I the patience to try and understand your code I might try and see what the problem is, but uncommented code for me is a nightmare My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Yashied Posted July 2, 2009 Author Share Posted July 2, 2009 Yashied, thank you for your work, much appreciated. However, just a couple of questions:1. If I were to use a modifier like Ctrl+Alt along with F12, it will send a 'Release' message even if I'm still holding down Ctrl+Alt. Is that the intended behavior, to ignore modifier keys?2. If I hold down Ctrl+Alt+F12, then release Ctrl+Alt, and then press say 'Shift' and finally release F12 (even releasing Shift too), the function never gets the 'Released' message. Same goes for re-pressing Ctrl or Alt, and then releasing all three - the Released message is never sent.Thanks again though!Had I the patience to try and understand your code I might try and see what the problem is, but uncommented code for me is a nightmare Thanks to you, ascendant. But take into account all the nuances are not trivial task, especially in the hook. In this case, the code will be in x8 more and less reliable. It may be more reasonable to implement it in a particular case, rather than to write a universal procedure, thereby sacrificing its core strengths. I decided to take a timeout for this job and leave until version 1.6. But if the 1.7 beta to something interesting, you can use it, it is fully working.Once again thank you for your understanding of this material, I hope I will come back to this later.Good luck. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted July 7, 2009 Share Posted July 7, 2009 Yashied, working with your UDF and in connection to my last request... would it be possible to add a flag to the function call, with which the user can chose whether the key is consumed or not? Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Yashied Posted July 7, 2009 Author Share Posted July 7, 2009 Yashied, working with your UDF and in connection to my last request... would it be possible to add a flag to the function call, with which the user can chose whether the key is consumed or not?Best Regards$HK_FLAG_NOBLOCKHOTKEY not fit? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
KaFu Posted July 7, 2009 Share Posted July 7, 2009 Read... think... post... messed up the sequence , thanks for the fast reply! OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
rexx Posted August 17, 2009 Share Posted August 17, 2009 Hi, thanks for this great UDF!But I have a question, why the mouse buttons are not supported?Now I use AsyncHotKeySet() to set mouse hotkeys, but it can not use modifiers.Is it possible to use mouse buttons as hotkey in your UDF? Link to comment Share on other sites More sharing options...
Yashied Posted August 17, 2009 Author Share Posted August 17, 2009 No, the mouse is not supported, because UDF is based on a hook. Hook for the mouse - this is from another area. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Jeff West Posted August 17, 2009 Share Posted August 17, 2009 I'm trying to use HotKey.au3 to use Win-L to lock the computer and run the screen saver based on a post from Lej.After pressing Win-L the computer locks and the screen saver runs. The problem is after I unlock the computer the keyboard locks up until I hit a modifier key (shift, ctrl, alt, or win).Try this to recreate:Have Notepad open when running the scriptRun the scriptPress Win-LUnlock the computerTry typing in NotepadTyping "l" the first time will allow all the alphanumeric keys to work. Typing "l' the second time will lock the computer without pressing the Win key.#include "HotKey.au3" #include "vkConstants.au3" HotKeySet("{Esc}", "_Quit") _HotKeyAssign(BitOr($CK_WIN, $VK_L), "ScreenSaver") While 1 Sleep(10) WEnd Func ScreenSaver() Local Const $SC_SCREENSAVE = 0xF140 DllCall('user32.dll', 'int', 'LockWorkStation') _SendMessage(_WinAPI_GetDesktopWindow(), $WM_SYSCOMMAND, $SC_SCREENSAVE, 0) EndFunc ;==>ScreenSaver Func _Quit() Exit EndFunc ;==>_QuitThe problem isn't specific to Win-L. The same thing happens when I change the script to use Win-K (hitting "k" the second time will lock the computer)Any ideas on what I'm doing wrong?--Jeff 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