Mannyfresh31 Posted January 14, 2018 Share Posted January 14, 2018 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 More sharing options...
careca Posted January 14, 2018 Share Posted January 14, 2018 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 More sharing options...
Mannyfresh31 Posted January 14, 2018 Author Share Posted January 14, 2018 it is my application but I want to share it with other people plus I want to learn to do that trick for future references Link to comment Share on other sites More sharing options...
careca Posted January 14, 2018 Share Posted January 14, 2018 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 More sharing options...
Mannyfresh31 Posted January 14, 2018 Author Share Posted January 14, 2018 Yeah it's the way I have my app right now but I was just wondering if there was a way to do such a thing well I guess it is pointless besides it would make the app look cool I think Link to comment Share on other sites More sharing options...
spudw2k Posted January 14, 2018 Share Posted January 14, 2018 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 Mannyfresh31 and careca 2 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Mannyfresh31 Posted January 15, 2018 Author Share Posted January 15, 2018 @spudw2kthat is close to what I want. Thank you so much! 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