Jump to content

Autoit Popup Menu


HRWL
 Share

Recommended Posts

  • Moderators

If you have been searching as you say, I am surprised you missed these in the help file:

  • TrayCreateMenu
    • TrayCreateItem
  • GuiCtrlCreateMenu
    • GuiCtrlCreateMenuItem

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

For a context menu:

$ContextMenu = GUICtrlCreateContextMenu($SomeControl)
Local $Menu = GUICtrlCreateMenu("Functions", $ContextMenu, 1)
GUICtrlCreateMenuItem("Blahblah", $Menu, 1)
GUICtrlSetOnEvent(-1, "Jump2ThisFunctionName")
GUICtrlCreateMenuItem("Blahblah2", $Menu, 2)
GUICtrlSetOnEvent(-1, "Jump2ThisFunctionName2")

 

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

  • 3 weeks later...
On 9/7/2017 at 1:59 PM, JLogan3o13 said:

If you have been searching as you say, I am surprised you missed these in the help file:

  • TrayCreateMenu
    • TrayCreateItem
  • GuiCtrlCreateMenu
    • GuiCtrlCreateMenuItem

I did in fact miss the TrayCreateItem... But what I'm looking for with this is similar to GuiCtrlCreateMenuItem, but without having to create a gui beforehand.

With my current script running on AHK, following example #2, the context menu waits for a hotkey, when activated, the menu shows up reguardless of active windows, I select the item and the script runs it's set action, and hides until activated again.

 

Quote

; EXAMPLE #2: This is a working script that creates a popup menu that is displayed when the user presses the Win-Z hotkey.

; Create the popup menu by adding some items to it.
Menu, MyMenu, Add, Item1, MenuHandler
Menu, MyMenu, Add, Item2, MenuHandler
Menu, MyMenu, Add  ; Add a separator line.

; Create another menu destined to become a submenu of the above menu.
Menu, Submenu1, Add, Item1, MenuHandler
Menu, Submenu1, Add, Item2, MenuHandler

; Create a submenu in the first menu (a right-arrow indicator). When the user selects it, the second menu is displayed.
Menu, MyMenu, Add, My Submenu, :Submenu1

Menu, MyMenu, Add  ; Add a separator line below the submenu.
Menu, MyMenu, Add, Item3, MenuHandler  ; Add another menu item beneath the submenu.
return  ; End of script's auto-execute section.

MenuHandler:
MsgBox You selected %A_ThisMenuItem% from the menu %A_ThisMenu%.
return

#z::Menu, MyMenu, Show  ; i.e. press the Win-Z hotkey to show the menu.

 

Untitled.png

Link to comment
Share on other sites

So a context menu of sorts, activated by a hotkey, that can appear on top of any window? I'd say you can create a bogus window and spawn a menu like that, im not sure, but i think you really have to create a window, even if it's transparent.

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