-
Notifications
You must be signed in to change notification settings - Fork 5
/
Radial Menu_Example1.ahk
36 lines (29 loc) · 1.18 KB
/
Radial Menu_Example1.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
; This scripts creates a radial menu / pie menu
; The selected menu item is returned as a string.
; mbutton is used in this example to trigger the menu
#SingleInstance Force
#Requires AutoHotkey v2.0-beta.3
;#NoEnv
#Include Radial_Menu.ahk
mButton::
{
GMenu := Radial_Menu()
; Settings for dark mode
GMenu.SetMode("Dark")
GMenu.SetSections("8")
GMenu.Add("Save", "Images/analysis_meas_distance16.gif", 1, (*)=> (MsgBox("Callbacktest")))
GMenu.Add("Save2", "Images/smt_flat_wall_mt.gif", 2)
GMenu.Add2("Save2special", "Images/analysis_meas_distance16.gif", 2, (*)=> (MsgBox("Callbacktest2")))
GMenu.SetKey("mbutton")
GMenu.SetKeySpecial("Ctrl")
GMenu.Add("Save3", "", 3)
GMenu.Add("Save4", "Images/smt_flat_wall_mt.gif", 4)
GMenu.Add("Save5", "Images/smt_flat_wall_mt.gif", 5)
GMenu.Add2("Save5se", "Images/fbcp_asm_image.gif", 5)
GMenu.Add("Save6", "Images/smt_flat_wall_mt.gif", 6)
GMenu.Add("", "", 7)
GMenu.Add("Save8", "Images/smt_flat_wall_mt.gif", 8)
Result := GMenu.Show()
; This Result string can be used in if else statements, in this demo i just use a message box.
MsgBox(Result)
}