seadoggie01 Posted April 25, 2019 Share Posted April 25, 2019 (edited) So I've looked at the help file and it doesn't seem to mention anything about this, but maybe I'm missing something. I'm trying to use code like this... HotKeySet("{ALT}{F9}", "MyExit") While True ; Do stuff here... not important Sleep(100) WEnd Func MyExit() ConsoleWrite("MyExit called") Exit EndFunc But when I press Alt + F9 nothing happens. However, this code works... HotKeySet("!{F9}", "MyExit") While True ; Do stuff here... not important Sleep(100) WEnd Func MyExit() ConsoleWrite("MyExit called") Exit EndFunc (Note: the only difference is ! instead of {ALT}) Is this expected behavior? I just find the code easier to read when not using !^+ instead of {ALT}{CTRL} and {SHIFT} The help for Send() seems to indicate that {ALT} is valid in it's table Edit: Forgot to mention, running AutoIt Version 3.3.14.5 Edited April 25, 2019 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 25, 2019 Moderators Share Posted April 25, 2019 seadoggie0, HotKeySet can only work on one key, possibly with one or more of the Shft/Ctrl/Alt/Windows modifier keys. The {ALT} keyword is used to define the Alt key itself - so your first attempt will not work as you are trying to use 2 keys - one of which cannot be used as it is one of the modifiers (as explained in the Help file). Your second attempt is syntactically correct and so will work as expected. M23 seadoggie01 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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