 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
Posted: Fri Nov 06, 2009 3:08 pm Post subject: RADIAL MENU scripts - updates - 29.01.2012. |
|
|
Here you can find my radial menu works:
1. Radial menu v4 - portable application that helps you to control computers with minimal effort. It's a thing to explore.
2. [module] RM2module
3. Radial menu designer (RMD)
4. Radial menu "mg" method
5. [module] Radial menus and docks - obsolete
6. Simple radial menu - obsolete
7. Radial menu v3 - obsolete
8. Radial menu v2 - obsolete
9. Radial menu v1 - obsolete
All menus are skinnable. All except 6,8,9 are using Tic's GDI+ function library. Thank you Tic!
You can also find some nice modifications and experiments from other AHK community members here. Just scroll this topic down...
Radial menu v4
Short description:
Radial menu is a new method of giving commands to computers. It's a powerful hotkey, launcher, mouse gestures system, and much more. Packed in ergonomic interface, driven by AutoHotkey_L unicode, highly adjustable and extendible, can do almost anything you wish.
It consist of following components:
- radial menu
- mouse gestures
- all AutoHotkey_L features (hotkeys, hotstrings, etc.)
- some other extra features (Navigator, always on top toggle, etc.)
For further information, please read Radial menu help file which is included in Radial menu package. Read releasing post.
Default hotkeys:
Rbutton (right mouse button):
- Drag down and hold to show radial menu, release it to select item.
- Drag in other directions to execute mouse gestures. Drag up shows Navigator.
Lbutton (left mouse button): shows/hides submenus
Download:
- Radial menu v4.zip (portable app)
- last change: 29.01.2012. (day.month.year)
- last version: 4.33
License is included in Radial menu package
- last license change: 13.09.2010. (day.month.year)
Contact: contact link
___________________
Notes: RM license prohibits (re)distribution without my written permission. Read also: Posting Radial menu code - regulation. RM license is only temporary, I can change it whenever I want, on any way I want. It's good to know that the author of this program is a lawyer. However, I hope that you will obey license/authorship terms and act like moral person in general not because you fear me as a lawyer, but because you respect my hard work and decision to share it with community.
Keywords: radial menu, pie menu, circle menu, circular menu, ring menu, Boris Mudrinić, Learning one
More previews
Some obsolete works:
- Radial menu v3
- Radial menu v2
- Radial menu v1
- Simple radial menu

Last edited by Learning one on Sun Jan 29, 2012 1:38 pm; edited 105 times in total |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4608 Location: AHK Forum
|
Posted: Fri Nov 06, 2009 5:12 pm Post subject: |
|
|
Looks nice
May I give some comments
While it is nice that mouse jumps back to the middle, a timer before execution would be good as well.
So I would need to point on an item for defined mseconds before it gets executed.
This way I could leave the area when accessed by accident as well
Also would be great if this could be in a function style + variable hotkeys and easy to define menu.
Something like  | Code: | ;Define menu = ItemName1|FunctionOrLabelOrFilePath:ItemName2|FunctionOrLabelOrFilePath...
MenuItems=Notepad|notepad.exe:Windows`nExplorer|%A_WinDir%\explorer.exe
;User defined Hotkey
Hotkey=RButton
;function
RadialMenu(MenuItems, Hotkey="RButton") |
Each time you add/delete/change an Item you would need to change the code and this is not very practical, I think. _________________ AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun  |
|
| Back to top |
|
 |
MarcInSpace
Joined: 23 Feb 2009 Posts: 30
|
Posted: Fri Nov 06, 2009 6:53 pm Post subject: |
|
|
Wow, amazing! Thanks for this great script.
Yet, I do agree completely with HotKeyIt about the timer (in fact that was my second reaction! [The first was suprise]) and the "function style".
Greetings,
Marc |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 210 Location: Greece/Rhodos
|
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
Posted: Sat Nov 07, 2009 3:59 pm Post subject: |
|
|
HotKeyIt, MarcInSpace, Delusion, thank you for compliments!
@ HotKeyIt, MarcInSpace
| Quote: | a timer before execution would be good as well.
So I would need to point on an item for defined mseconds before it gets executed. |
Hmm... I prefer "touch to select". It's faster and simpler.
Required actions to select comparison:
* touch to select
1. click&hold Rbutton
2. drag mouse at some angle
* point on an item for defined mseconds before it gets executed
1. click&hold Rbutton
2. drag mouse at some angle
3. you have to think how far you move your mouse
4. after you "aimed" item, you have to wait for defined mseconds
| Quote: | | Also would be great if this could be in a function style |
Yes, I definitely agree. But that will wait for a while...
RADIAL MENU v2
I'm currently working on RADIAL MENU v2. It will look much better. I think I will be able to upload it tomorrow. So visit this topic again! |
|
| Back to top |
|
 |
netfun81
Joined: 28 Oct 2006 Posts: 58
|
Posted: Sat Nov 07, 2009 6:21 pm Post subject: |
|
|
| Very nice. You might consider making an ini file or an easier way to add/change applications for those more new to AHK. |
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
Posted: Sun Nov 08, 2009 12:45 pm Post subject: |
|
|
Check out Radial menu v2!
@netfun81
| Quote: | | Very nice. You might consider making an ini file or an easier way to add/change applications for those more new to AHK. |
Thanks netfun81. Unfortunately, Radial menu v2 still don't use .ini file. |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 210 Location: Greece/Rhodos
|
Posted: Sun Nov 08, 2009 12:49 pm Post subject: |
|
|
nice but i liked the buttons in the first on better...these bigger ones dont look so nice
and yeah using an ini file for quickly adding and removing items would be nice _________________ Popcorn Movie Db
Simple Apnea Trainer |
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
|
| Back to top |
|
 |
Moebius
Joined: 08 Mar 2009 Posts: 28
|
Posted: Sun Nov 08, 2009 8:09 pm Post subject: |
|
|
nice script!
The setting "build effect = 0" does not show the menu instantly.
Maybe the menu should be configurable in a settings file?
Submenus would also be nice.
easyGestures in firefox uses the same method, so it conflicts with radialmenu...
If you like, take a look at my page - i also tried to do a pie menu tool, but its vb6 & flash based. _________________ http://monschein.org |
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
Posted: Mon Nov 09, 2009 10:16 am Post subject: |
|
|
Check out new script, Simple radial menu
Different approach, best results.
@ReflexNPG
Thanks.
use:
BuildDelay = 0
BuildEffect = 0
I took a look at your page. I like your MoWaMouse. |
|
| Back to top |
|
 |
Delusion
Joined: 16 Jul 2008 Posts: 210 Location: Greece/Rhodos
|
Posted: Mon Nov 09, 2009 11:59 am Post subject: |
|
|
nice
i rewrote your new simple radial menu and made some small changes and improvements :
| Code: |
/*
Simple radial menu (40x40 buttons) by Learning one
Modified by Delusion
AHK forum location: http://www.autohotkey.com/forum/viewtopic.php?p=308352#308352
*/
;________START_________________________________________|
#NoEnv
#SingleInstance Force
#Persistent
SetBatchLines -1
SetWinDelay -1
SetControlDelay -1
;________SETTINGS______________________________________|
$ProgramName := "Radial Menu", $Version := "Simple Version", $MainGui := "1"
$BuildDelay := "200", $ButtonBack := "Button5.png"
Item1 := "Test"
Item2 := "Meow"
Item3 := "123"
Item4 := "Boring"
Item5 := "Test 2"
Item6 := "blabla"
Item7 := "000"
Item8 := "15HFF"
;________AUTO EXEC_____________________________________|
IFNotExist, %A_ScriptDir%\%$ButtonBack%
{
URLDownloadToFile, http://www.autohotkey.net/~Delusion/%$ButtonBack%, %A_ScriptDir%\%$ButtonBack%
Sleep 500
}
GoSub BuildGui
Menu Tray, Tip, % $ProgramName A_Space $Version "`n by Learning one (Modified by Delusion)"
Menu Tray, Icon, Shell32.dll, 44
RETURN
;________BUILD GUI_____________________________________|
BuildGui:
Gui %$MainGui%: +AlwaysOnTop +ToolWindow -Caption +LastFound
WinSet, Region, 1-0 W180 H180 R180-180
Gui %$MainGui%: Font, s7 cwhite, Arial
Gui %$MainGui%: Color, fffffd
PicturePositions = x70 y10|x115 y25|x130 y70|x115 y115|x70 y130|x25 y115|x10 y70|x25 y25
TextPositions = x73 y13|x118 y28|x133 y73|x118 y118|x73 y133|x28 y118|x13 y73|x28 y28
Loop 8
{
Loop, Parse, PicturePositions, `|
Gui %$MainGui%: Add, Picture, %A_LoopField% w40 h40 BackgroundTrans gSub%A_Index%, %A_ScriptDir%\%$ButtonBack%
Loop, Parse, TextPositions, `|
Gui %$MainGui%: Add, Text, %A_LoopField% w34 h34 Center Bold BackgroundTrans gSub%A_Index%, % Item%A_Index%
}
Gui %$MainGui%:Add, Picture, x70 y70 w40 h40 gGuiHide, %A_ScriptDir%\%$ButtonBack%
Gui %$MainGui%:Add, Text, x73 y78 w34 h24 Center BackgroundTrans gGuiHide, Close`nMenu
RETURN
;________SUBROUTINES___________________________________|
Sub1:
RETURN
Sub2:
RETURN
Sub3:
RETURN
Sub4:
RETURN
Sub5:
RETURN
Sub6:
RETURN
Sub7:
RETURN
Sub8:
RETURN
;________HOTKEY________________________________________|
RButton::
Sleep %$BuildDelay%
IF not (GetKeyState("RButton","p"))
{
SendInput {RButton}
RETURN
}
CoordMode Mouse, Screen
MouseGetPos mx1, my1
RMGuiX := mx1 - 90
RMGuiY := my1 - 90
Gui %$MainGui%: Show, x%RMGuiX% y%RMGuiY% w180 h180, % $ProgramName
WinSet TransColor, fffffd 255, % $ProgramName
RETURN
GuiHide:
SendInput {LButton up}
Gui %$MainGui%: Hide
CoordMode Mouse, Relative
RETURN
|
_________________ Popcorn Movie Db
Simple Apnea Trainer |
|
| Back to top |
|
 |
Moebius
Joined: 08 Mar 2009 Posts: 28
|
Posted: Mon Nov 09, 2009 12:17 pm Post subject: |
|
|
i've set builddelay = 0 and buildeffect = 0
but it still draws each item one by one which takes some time...
I like the simple radial menu - it works instantly.
Here i have another 2 cents
What about a dynamic number of menu items?
And what about a taskmanager as radial menu?
Thanks for sharing your scripts! _________________ http://monschein.org |
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 993 Location: Croatia
|
Posted: Mon Nov 09, 2009 9:11 pm Post subject: |
|
|
@Delusion
eh, I also rewrote Simple radial menu before I saw your (nice ) modification...
Simple radial menu is now in "newbie friendly style"
one interesting new setting:
UnfocusMenu = 1 ; Activates window that was active before pressing hotkey, so you can scroll it, type text, etc...
@ReflexNPG
In fact Gui-s are always shown one by one, but with this (0) settings, ti should be almost invisible. It is almost invisible on my computer...  |
|
| Back to top |
|
 |
doyle
Joined: 14 Nov 2007 Posts: 325 Location: London, England
|
Posted: Tue Nov 10, 2009 9:26 am Post subject: |
|
|
Great Script.
I customised v2, so you can specify how many icons you want, and can define them at the start.
I found that I didnt always require 8 icons.
If you think it is a good idea, please add it.
Thanks again.
I have messed around with the button sizes though, so I wouldnt recommend using mine as is.
| Code: | Number = 5 ; Number of Icons
TextSize = 8 ; Item's text size Once when you get used to your radial menu, you will remember item's positions, and text size won't be so important to you. So you will select items by position in your mind, not by reading item's text.
TextColor = black ; Item's text color
Font = Calibri ; Item's font
BuildDelay = 170 ; menu will start to show itself after %BuildDelay% miliseconds. To show it instantly, set 0. This delay gives you opportunity to send normal RButton click without annoying menu showing. THE BEST THING TO DO is to change hotkey to XButton1 or XButton1 (if you have them - I don't) and use BuildDelay = 0. MButton is also good idea.
BuildEffect = 50 ; menu items will show themself, one by one, in interval of %BuildEffect% ms. To show them all instantly, set 0.
ItemBounce = 1 ; 1 means: items will bounce when you select them. 0 means: items will not bounce.
SoundOnSelect = 1 ; 1 means: play sound when item is selected. 0 means: don't play sound. Of course, you can change sound...
; SoundOnShow ; Play with effects: you can easily add this by slightly modifying script...
; SoundOnDestroy
Color = Black ; this is alternative background color, if script can't load picture (button picture).
ButtonBack = Button3.png ; button's background
Item1 = Calc
Item2 = NotePad
Item3 = Explorer
Item4 = About
Item5 =
Item6 =
Item7 =
Item8 =
;===Auto-execute======================================================================
StringTrimRight, Sname, A_ScriptName, 4
Menu, Tray, Tip, %Sname%
Loop, %Number% ; load item's background (fake button), set altenative background and font
{
; If you want to change item's background, try to use 50x50 images. Some other backgrounds are available on:
; http://www.autohotkey.net/~Learning one/Radial Menu
; Play with effects: small deviations in Add, Picture options have interesting effect:
; x0 y-1 w69 h69 ; small shadow
; x0 y-1 w71 h71 ; no shadow
Gui 9%A_Index%:Add, Picture, x0 y0 w32 h32 , %A_scriptdir%\%ButtonBack%
Gui 9%A_Index%:Font, s%TextSize%, %Font%
Gui, Color, EEAA99
Gui +LastFound ; Make the GUI window the last found window for use by the line below.
WinSet, TransColor, EEAA99
}
;======Set item names======
; This is just example. Build your own menu! You don't need to manually reposition item's text (like in Radial menu v1).
; Play with effects: Remove BackgroundTrans in GuiTextOptions and set Color = 757500 (GUI's color)
GuiTextOptions = x2 y28 w32 h32 c%TextColor% BackgroundTrans
Loop, %Number%
{
current := Item%A_Index%
Gui 9%A_Index%:Add, Text, %GuiTextOptions% , %current% ; Auto build items 1-5
}
;==========================
;===Hotkey==============================================================================
RButton:: ; Press & hold to show menu. Touch items with mouse to select them. Release RButton to hide menu. THE BEST THING TO DO is to change hotkey to XButton1 or XButton1 if you have them ( I don't :( )
PressedTime = 0
CoordMode, mouse, Screen
MouseGetPos, mx1, my1
SetTimer, RadialMenuClose, 35
Loop, %Number% ; Draw items (GUIs) at exact positions --> 50x50 buttons
{
if A_index = 1
{
RMx := mx1-25
RMy := my1-95
if BuildDelay
{
Sleep , %BuildDelay% ; menu will start to show itself after %BuildDelay% ms
if not (GetKeyState("RButton","p"))
Return
}
}
Else if A_index = 2
{
RMx := mx1+25
RMy := my1-75
}
Else if A_index = 3
{
RMx := mx1+45
RMy := my1-25
}
Else if A_index = 4
{
RMx := mx1+25
RMy := my1+25
}
Else if A_index = 5
{
RMx := mx1-25
RMy := my1+45
}
Else if A_index = 6
{
RMx := mx1-75
RMy := my1+25
}
Else if A_index = 7
{
RMx := mx1-95
RMy := my1-25
}
Else if A_index = 8
{
RMx := mx1-75
RMy := my1-75
}
Gui 9%A_Index%: +AlwaysOnTop +ToolWindow -caption +LastFound
;WinSet, Region, 1-0 W50 H50 R25-25
Gui 9%A_Index%: Show, x%RMx% y%RMy% h40 w48, Item%A_Index%
WinSet, Transparent, 255, Item%A_Index%
Sleep, %BuildEffect%
if not (GetKeyState("RButton","p"))
Return
}
SetTimer, GetSelectedItem, 15
Return
;===Subroutines=========================================================================
GetSelectedItem: ; menu items are identified by GUI's title!
MouseGetPos, , , WinID
WinGetTitle, Item, ahk_id %WinID%
if Item contains Item ; This is just example. Build your own menu!
{
CoordMode, mouse, Screen
MouseMove, %mx1%, %my1%
if Item = Item8 ; About Radial menu
{
if ItemBounce = 1
Gosub, ItemBounceOnSel
MsgBox, 64, About, Title:%A_Tab%Radial menu v2`nAuthor:%A_Tab%Boris Mudrinic (Learning one on AHK forum)`nContact:%A_Tab%boris-mudrinic@net.hr`n`nLicence:`nFree for non-commercial use.`nFor commercial use, e-mail me please.`n`nIf you will use Radial menu in your free software,`nmention author's name and contact.
Return
}
else if Item = Item7 ; Runs Windows Explorer
{
if SoundOnSelect = 1
SoundPlay, *-1 ; plays simple beep.
Run, %A_WinDir%\explorer.exe
if ItemBounce = 1
Gosub, ItemBounceOnSel
Return
}
else if Item = Item6 ; Runs Notepad
{
if SoundOnSelect = 1
SoundPlay, *-1 ; plays simple beep.
Run, notepad
if ItemBounce = 1
Gosub, ItemBounceOnSel
Return
}
else if Item = Item5 ; Runs Calculator
{
if SoundOnSelect = 1
SoundPlay, *-1 ; plays simple beep.
Run, %A_WinDir%\system32\calc.exe
if ItemBounce = 1
Gosub, ItemBounceOnSel
Return
}
else
{
if ItemBounce = 1
Gosub, ItemBounceOnSel
MsgBox,, You selected:, %Item%,1
}
}
Return
RadialMenuClose:
PressedTime++
if not (GetKeyState("RButton","p"))
{
if (PressedTime < 7) ; if user holded RButton for less than 210ms ...
SendInput, {RButton} ; ... script will send normal RButton click
SetTimer, GetSelectedItem, off
SetTimer, RadialMenuClose, off
; Fade out effect
InitialTrans = 255
Loop, 17
{
Loop, %Number%
WinSet, Transparent, %InitialTrans%, Item%A_Index%
InitialTrans -= 15
Sleep, 25 ; change fade out speed if you wish
}
Loop, %Number%
Gui 9%A_index%: Hide
Return
}
Return
ItemBounceOnSel: ; bounce effect
Critical
WinGetPos, XBounce, YBounce,,, %Item%
SetTimer, RadialMenuClose, off
SetTimer, GetSelectedItem, off
SetWinDelay, 5 ; bounce speed
if Item = Item1
{
Loop, %Number%
{
if A_Index <= 4
YBounce -= 4 ; bounce lenght
Else
YBounce += 4
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item2
{
Loop, %Number%
{
if A_Index <= 4
{
XBounce += 4
YBounce -= 4
}
Else
{
XBounce -= 4
YBounce += 4
}
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item3
{
Loop, %Number%
{
if A_Index <= 4
XBounce += 4
Else
XBounce -= 4
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item4
{
Loop, %Number%
{
if A_Index <= 4
{
XBounce += 4
YBounce += 4
}
Else
{
XBounce -= 4
YBounce -= 4
}
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item5
{
Loop, %Number%
{
if A_Index <= 4
YBounce += 4
Else
YBounce -= 4
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item6
{
Loop, %Number%
{
if A_Index <= 4
{
XBounce -= 4
YBounce += 4
}
Else
{
XBounce += 4
YBounce -= 4
}
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item7
{
Loop, %Number%
{
if A_Index <= 4
XBounce -= 4
Else
XBounce += 4
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
else if Item = Item8
{
Loop, %Number%
{
if A_Index <= 4
{
XBounce -= 4
YBounce -= 4
}
Else
{
XBounce += 4
YBounce += 4
}
WinMove, %Item%, , %XBounce%, %YBounce%
}
}
SetWinDelay, 100 ; default
SetTimer, GetSelectedItem, on
SetTimer, RadialMenuClose, on
Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ExitApp
Pause::
Suspend
Pause,,1
return
Escape::
Suspend
ExitApp
Return
F7::Reload
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|