Jump to content

Dropped menu with hotkey??


Recommended Posts

is there an easy way to make a menu drop down with a hotkey e.g GUICtrlSetState ( $menu1,$GUI_DROPPED) ??

 

idk something like 

HotKeySet("m", "DropMenu")

$menu1 = GUICtrlCreateMenu("Menu")
$menuitem1 = GUICtrlCreateMenuItem("Settings", $menu1)
$menuitem2 = GUICtrlCreateMenuItem("Exit", $menu1)

Func DropMenu ()

GUICtrlSetState ( $menu1,$GUI_DROPPED)

EndFunc

Link to comment
Share on other sites

If it's your application, why would you want to automate that?

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

I failed to understand why you would need to to that, as you have full control of what you need the application to do,

you can just call whatever function you want with the hotkey, really zero need to open the menu.

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

I've always preferred using access keys on controls that support it natively.  This is done by adding an ampersand (&) in front of a letter in the control text, then using the alt key to "activate' the control.  As an example (below), hit the Alt key on the keyboard to display the underline beneath the letter 'M' in Menu, then hit the 'M' key to open it.  Subsequently you can hit 'x' to toggle the Exit menu item.

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <StaticConstants.au3>

Example()

Func Example()
    GUICreate("My GUI menu", 300, 200)

    $menu1 = GUICtrlCreateMenu("&Menu")
    $menuitem1 = GUICtrlCreateMenuItem("&Settings", $menu1)
    $menuitem2 = GUICtrlCreateMenuItem("E&xit", $menu1)

    GUISetState(@SW_SHOW)

    Local $sFile
    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $menuitem2
                ExitLoop
        EndSwitch
    WEnd
    GUIDelete()
EndFunc   ;==>Example


 

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...