Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

RADIAL MENU scripts - migrated to new forum


  • Please log in to reply
1310 replies to this topic
netfun81
  • Members
  • 58 posts
  • Last active: Feb 21 2010 09:32 AM
  • Joined: 28 Oct 2006
Was messing around with the pie menu concept. I modified one of my earlier scripts to test using the menu command for submenus. It might be an good way to have submenus.

Thanks to Learning one for the ideas and how to use up some time :)

Posted Image

If you want to test you will need this image file:
https://ahknet.autoh...n81/kc pie2.png

#NoEnv 
SendMode Input
SetWorkingDir %A_ScriptDir%

CoordMode, Mouse, Screen 
Gui +ToolWindow +AlwaysOnTop -Caption
Gui, Color, EEAA99
Gui +LastFound 
WinSet, TransColor, EEAA99
pic:="kc pie2.png"
color:="cBlack"
gui, font, s10, Arial bold

Gui  Add, Picture, x5 y5, %pic% 
Gui, Add, Text, gExplorer %color% x170 y40 BackgroundTrans, Explorer
Gui, Add, Text, gFirefox %color% x210 y100 BackgroundTrans, Firefox
Gui, Add, Text, gIE %color% x170 y160 BackgroundTrans, IE
Gui, Add, Text, gCcleaner %color% x70 y160 BackgroundTrans, Ccleaner
Gui, Add, Text, ghide %color% x142 y96 BackgroundTrans, X
Gui, Add, Text, gtaskmgr %color% x30 y100 BackgroundTrans, Taskmgr
Gui, Add, Text, gshutdown %color% x70 y40 BackgroundTrans, Shutdown
Gui, show, w295 h230
Gui, hide
return

Ccleaner:
Run, C:\program files\ccleaner\ccleaner.exe
gui, hide
return

Explorer:
Run, explorer.exe c:\program files
gui, hide
return

Firefox:
Run, c:\program files\mozilla firefox\firefox.exe
gui, hide
return

IE:
Run, c:\program files\internet explorer\iexplore.exe
gui, hide
return

Shutdown:
Menu, shut, Add, Logoff
menu, shut, Add, Turnoff
Menu, Shut, Show
Menu, Shut, Deleteall
return

Logoff:
shutdown, 0
return

Turnoff:
shutdown, 1
return

Taskmgr:
Run, c:\windows\system32\taskmgr.exe
gui, hide
return

hide:
gui, hide
return

mbutton::
MouseGetPos, x, y
mgx:=x-145
mgy:=y-105
Gui Show, x%mgx% y%mgy%
;Sleep 3000
;gui, hide
return

mbutton & rbutton::
WinGet, id, list,,, Program Manager
      Loop, %id%
      {
         StringTrimRight, this_id, id%a_index%, 0
         WinGetTitle, title, ahk_id %this_id%
         WinGetClass, class, ahk_id %this_id%
         WinHide, ahk_id %this_id%
         HWins = %HWins%||%this_id%
       }
run, notepad.exe c:\program files\autohotkey\scripts\script.txt
      Return
   
Lshift & mbutton::
      Loop, Parse, HWins, ||
      WinShow, ahk_id %A_LoopField%
      Return

Lctrl & rbutton::Alttab
return


Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Nice!

You inspired me to:
1. create new radial menu mutant ( :x so many solutions, and I can't just stick to one to the end... well, that's development - searching for best solution :roll: )
2. remind people on one thing; If your attitude is: Radial menus are nice, but I really need submenus, and I can't wait until someone creates radial submenus,
do a compromise; create your main menu in radial form, and configure it that selecting one (or a few) items opens classic drop-down menu (as a submenu).
(For RM v3.15 users: you can define drop-down submenu in My subroutines.ahk) Tip: If you want icons in your drop-down submenu, use Majkinetor's MMenu.




:!: EDIT 5.1.2009. - good news
Radial menu v3.16 is finished! I'm currently writing a help file.
The most important improvements are: SUBMENUS! (in radial form, of course)
They are more useful then I thought. In fact, I can't believe how fast&easy I can give orders to my computer with RM v3.16!
I'll release the code when I finish a help file, and some negotiations are done.


Bebert
  • Members
  • 84 posts
  • Last active: Jan 03 2011 06:47 AM
  • Joined: 08 Jun 2009
@Learning one thanks it's a great script, works very well in Win 7 x64.

Q: where is the delay setting to display the menu longer?

thanks

Alaskatu
  • Guests
  • Last active:
  • Joined: --
:D
Thanks for all the good work, the lern one!!!
I am exited to see our improviments by v.3.16
Thanks,
Alaskatu

pdiddy
  • Guests
  • Last active:
  • Joined: --
progasm!

This is awesome.. it's very nearly replaced rocketdock for me(2 years of faithful use). Following this forum thread daily now. this is as high praise as a portable app dork can offer.


i have one request: working folder support. Right now all executables are launched from the context of the autohotkey.exe folder. Most launcher programs have/need the ability to specify the working directory so that if the program is looking for local files (ini's, dll's ) it doesn't have to look in the PATH. This is a major key to portable application function. please please please look into this.


you've changed my life with this script.. much love...

Portable Paul

trik.us
  • Guests
  • Last active:
  • Joined: --
Posted Image Bravo, sir! Bravo!

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
@All
Thank you all for kind words, encouragement, suggestions!

I think I'll be able to release RM v3.16 in about next 4 days.
I suggest everyone to try it - I think you will not regret it.

Just to prepare you for RM v3.16:
- RM v3.16 evolved very much compared to v3.15
- submenus
- skin changer
- 3 built in skins
- up to 39 items in main menu
- up to 19 items per submenu
- up to total 95 items in main menu + all submenus
- help file
- possibility to set custom subroutine for every item
- can control any other script by sending WM_COPYDATA to it
- can receive WM_COPYDATA from other scripts
- automatic shortcut creation
- more general settings; AutoSubmenuMarking, RMProcessPriority...


RM v3.16 is a powerful hotkey and launcher, packed in ergonomic and nice looking interface.


RM v3.16 can be customized a lot. Just to be clear, it will take some time until you discover how to set it up and explore all possibilities. So be patient!
It's like AutoHotKey itself, you first have to learn some principles, and than you can use/custmize it.
Learn from help file and from .ini files. For example; 1) open RM settings.ini 2) show your menu and 3) compare what is written in .ini file and what you see in your menu.


* * *


@Bebert

where is the delay setting to display the menu longer?


There is no such setting in RM v3+. It works on "release to select" principle; it is displayed only when your RMShowHotkey is down.
If want to display the menu longer you can use Simple radial menu (see first post in this topic) Simple radial menu works on "left click to select" principle - when you press and release menu show hotkey it is displayed until you: 1) click on item or 2) click on close menu button. I presonally use reworked Simple radial menu as always on top toolbar.

@pdiddy
Your working folder request is put on "to do list" for RM v3.17. Although it isn't not hard to do that, I currently don't have time to implant and test this improvement for RM v3.16

it's very nearly replaced rocketdock for me

As Rocketdock is planetary popular, I must say: Wow, what a compliment! Thanks! I'm sure you will like RM v3.16 when you get used to it.

kli6891
  • Members
  • 46 posts
  • Last active: Nov 24 2012 08:12 PM
  • Joined: 01 Aug 2009
Can you make a version that will activate once when the script executes and quits?

This makes it easy to use it with other right click programs.


Thanks.

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
@kli6891
RM is not right click program, it's just default setting in RM settings.ini

Text from RM v3.16 help file: (still not released):
RMShowHotkey. (Radial menu show hotkey) Button that shows RM's main menu after you pressed&holded it for %ShowDelay% miliseconds.
It's Rbutton by default. Hotkey combinations are not allowed. It can be any other mouse key, not just Rbutton.
Examples:
RMShowHotkey = Mbutton
RMShowHotkey = Xbutton1


Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
EDIT: updated 19.1.2010.

Learning one proudly presents you:
Radial menu v3.16

Description. This script shows radial menu around your mouse pointer when you press & hold specified button (RButton by default) for specified amount of time
(220 miliseconds by default). Release RButton above subitem to select it, or anywhere else to hide menu.
Item that has its own submenu is marked with two tiny stars near the top of the button. Click it with LButton (by default) to show its submenu.
Release RButton above subitem to select it, or anywhere else to hide submenu and main menu. Click with LButton in the center of showed submenu to close it.
Note that Radial menu is displayed only while your hotkey is down (RButton by default)
You can customize Radial menu to fit your needs by editing .ini files. Read help file!

Radial menu is a fast and simple method of giving commands to your computer. It's a powerful hotkey and launcher, packed in ergonomic and nice looking interface.

What's new in RM v3.16 compared to RM v3.15? That's a long list, but most important improvements are mentioned few posts above.

Legal stuff. Sorry for all that legal stuff in RM. I'm a lawyer, and I'm taught to act like that.
However, I hope that you will obey licence/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.

Current RM setup RM v3.16 can be set up on so many different ways. I was thinking a lot how to presetnt it to you.
Current RM setup is just suggestion how it should it be set up. You have total freedom to change it. Note that the Windows explorer
is only item in main menu that launches something (Windows explorer) and opens submenu Folders. All other items in main menu don't launch anything,
they just open theirs submenus because I really can't know what's your favorite file/app/script and where it's located...

Current skin that you see is Obsidian. Try other skins; Metal plate, Funky star or Fresh green. I'm not a design expert, but I created all 4 skins in the best of
my knowledge. There is a Change skin item in MenuControl submenu. Select it to launch Skin changer.
I encourage everyone to create and share new skin but you must read some important things about it in help file.

Sounds are not perfect. Sound on Show/Hide submenu is not implemented yet.

Help file is not totally finished but is useful. Study it, and follow instructions/references in it before you ask questions.

„Why there are so many settings? It's too complicated.“ When I was writing this script, I wanted to create a program that
can be customized a lot. I'm considering all those settings as richness of the program, not as unnecessary complication! Experienced coders know
that it is much simpler to create fixed, unchangeable program, which can't be customized a lot. Some people might get confused when they see
so many possibilities, and think; „That's too complicated for me, forget it“. That's totally wrong attitude.
Here is the catch; just change basic things, and leave all other settings as they are.
In more than 95% of cases you will only have to change just 2 things:
1. item's name or icon
2. item's action
and that's it! I think it can't be simpler.
So, once again, if you just started using RM, just change basic things, and ignore all other. Read help file!

Download Radial menu v3.16
If you like it or have some suggestions, post reply.

gongchao6330
  • Members
  • 24 posts
  • Last active: Jul 17 2011 06:26 AM
  • Joined: 25 Mar 2009
Great job!
I have tried it, works well!
And I have one suggestions, is it possible to show the submenu automatically when RButton is on it. When the RButton leaves the domain of the button, the submenu hides automatically. I have try to change RSMShowHotkey =RButton, but it does't works.

TomXIII
  • Members
  • 182 posts
  • Last active: Feb 28 2011 11:42 PM
  • Joined: 14 Apr 2009
Hi everyone!
@Learning one : I'm really happy to have given you some important lines of code especially when I see the evolution of this great work!
I have just one question : Why items that contain subs can be launched when the RButton is released?!

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Thanks!


@gongchao6330

is it possible to show the submenu automatically when RButton is on it

No, it's not designed to act like that. But I can do this without problem, by modifying the code.
I almost coded it to act like that, but in the last moment I decided not to do this because in that case, you would
be limited to just one ring in main menu. I like multiple rings in main menu. My private setup is 2 rings in main menu with separators in second ring.
Here's one picture I posted before in the early stage of developing submenus. Read the bottom <!-- m -->https://ahknet.autoh... ... 20lab1.png<!-- m -->

I have try to change RSMShowHotkey =RButton, but it does't works.

Help file says: RMShowHotkey and RSMShowHotkey can not have the same hotkey.
But OK, I understand that you tried to achieve showing submenu automatically when RButton is on it - no, it does not work in that way.


@TomXIII

I'm really happy to have given you some important lines of code especially when I see the evolution of this great work!

TomXIII, thank you once again! You really accelerated my research and success by showing me some of your ready solutions!

Why items that contain subs can be launched when the RButton is released?!

(I guess that when you say subs, you mean submenu, not custom subroutine and I'll answer in that persuasion...)
I'm considering that as a great thing! Item that has its own submenu should launch something that you are using most often from its submenu.
For example, Menu control item in main menu may launch settings or skin changer if you are using this most often among all other items in Menu control submenu...
Comp control item in main menu may launch hibernate if you are using this most often among all other items in Comp control submenu... and so on...

By the way, any news on LaunchIt?

TomXIII
  • Members
  • 182 posts
  • Last active: Feb 28 2011 11:42 PM
  • Joined: 14 Apr 2009

Item that has its own submenu should launch something that you are using most often from its submenu.

Greeaat idea!!!

@Learning one :
Since December 15th, I have "exams" (/tests ?!) for a diploma and I have pass all my time to revise. It ends this week and this week-end I shall be finally free. For LaunchIt, I think to rearrange some functions and some objectives or may be an other program based on LaunchIt... I don't know yet!

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
@TomXIII: good luck with the rest of exams