Jump to content

Prevent Alt Key from Doing Alt Key Things without Admin


Recommended Posts

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

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 ?

Link to comment
Share on other sites

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

Im sure than in 100 keys you'll find one that can serve as a modifier key.

Edited 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...