baconaise Posted January 27, 2019 Share Posted January 27, 2019 Hello! Is there a way to prevent pressing the Alt Key from highlighting menu items at the top of the screen without being an admin? I am trying to use Alt plus a function key as a hotkey, and the fact that Alt excites the menu is interrupting my function. Example: #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("!{F1}", "Alt_F1_Hotkey") Global $GUI_Main = GUICreate("Main GUI", 350, 40) Global $Alt_F1_HotKey_Input_Box = GUICtrlCreateEdit("", 0, 0, 350, 40, $ES_MULTILINE+$WS_VSCROLL) GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Main_Events") GUISetOnEvent($GUI_EVENT_MINIMIZE, "GUI_Main_Events") GUISetOnEvent($GUI_EVENT_RESTORE, "GUI_Main_Events") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func Alt_F1_Hotkey() $Alt_F1_HotKey_Input_Box_Text = GUICtrlRead($Alt_F1_HotKey_Input_Box) Send($Alt_F1_HotKey_Input_Box_Text) EndFunc Func GUI_Main_Events() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE Exit Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE Case @GUI_CtrlId = $GUI_EVENT_RESTORE EndSelect EndFunc Thanks in advance! Link to comment Share on other sites More sharing options...
Nine Posted January 28, 2019 Share Posted January 28, 2019 22 hours ago, baconaise said: and the fact that Alt excites the menu is interrupting my function. Instead of preventing it (which can get quite complicated), why don't you ensure that the focus is not on menu within the hotkeyset function ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
dmob Posted January 28, 2019 Share Posted January 28, 2019 Why not use Ctrl key instead of Alt? Link to comment Share on other sites More sharing options...
careca Posted January 28, 2019 Share Posted January 28, 2019 Why not use any other key instead of alt? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
baconaise Posted January 29, 2019 Author Share Posted January 29, 2019 7 hours ago, dmob said: Why not use Ctrl key instead of Alt? Ctrl and Shift are already assigned to different things. Link to comment Share on other sites More sharing options...
careca Posted January 29, 2019 Share Posted January 29, 2019 (edited) Im sure than in 100 keys you'll find one that can serve as a modifier key. Edited January 29, 2019 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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