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
Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009

Radial menu application updated to v4.39

What's new?

  • Updated AHK version and ChangeLog URLs (now available at ahkscript.org)
  • includes newest AutoHotkey 1.1.14.01 and RM2module v2.20
  • updated RM help

RM Changelog: v4.00 --> v4.01, v4.01 --> v4.20, v4.20 --> v4.25, v4.25 --> v4.26, v4.26 --> v4.27, v4.27 --> v4.29, v4.29 --> v4.30, v4.30 --> v4.31, v4.31 --> v4.32, v4.32 --> v4.33, v4.33 --> v4.34, v4.34 --> v4.35, v4.35 --> v4.36, v4.36 --> v4.37, v4.37 --> v4.38



RM2module updated to v2.20
What's new?

  • fixed RM2_ShowDocks()
  • updated Examples 9 and 10 including RM2Menu class

My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy


madfx
  • Members
  • 5 posts
  • Last active: Apr 09 2015 10:30 PM
  • Joined: 15 Jan 2014

Great script, thanks for all your hard work on it.

 

I have a question about setting up the Radial Menu script to only work within a specific program. I see you can add programs to the blacklist, but I'd like to specify the program Radial Menu is allowed to operate with. Which script do I need to modify to get this behavior?



joefango
  • Members
  • 56 posts
  • Last active: Jan 20 2018 02:44 PM
  • Joined: 02 Jun 2013

Great script, thanks for all your hard work on it.

 

I have a question about setting up the Radial Menu script to only work within a specific program. I see you can add programs to the blacklist, but I'd like to specify the program Radial Menu is allowed to operate with. Which script do I need to modify to get this behavior?

 

If you want a radial menu to work only with a specific program, you should take a look at the Radial context sensitive menu... (docs explain it very well)

 

--------------------------------------------------------

 

@Learning1: Thanks very much for your hard work and help, I'm moving...

 

Your toggle method works fine but if (like me) you are using a context sensitive docks hotkey, it doesn't work cause the docks showed previously with another app will not hide...

This is my hotkey:





XButton2::
{
	IfWinActive, ahk_class OperaWindowClass
	ShowOrHideDocks("82,83")
	else IfWinActive, ahk_class CryEditorClass
	ShowOrHideDocks("82,83")
	else IfWinActive, ahk_class Notepad++
	ShowOrHideDocks("81,84,85")
	else RM2_HideAllDocks()
	return
}

Another thing is that with all these docks features I don't need the Main Radial Menu anymore. Is there a way to disable it but keep the RMShowHotkey ? (needed it for mouse gestures)

 

-------------------

 

Last night "I dreamed" about this app in the future:

 

I went to site L1.com to download the latest update of the app "RMS Control"

and to the forum to read the latest news,

Awesome! there were new features!

you could create a container with a nice background!

right click on it to add a dock or many!

You could right click on docks to assign a radial menu or a function to execute!

And finally you could have many containers and some could been context-sensitive!



madfx
  • Members
  • 5 posts
  • Last active: Apr 09 2015 10:30 PM
  • Joined: 15 Jan 2014

If you want a radial menu to work only with a specific program, you should take a look at the Radial context sensitive menu... (docs explain it very well)

I read through the help document before asking. The help explains how to create additional context (program) sensitive menus, but that's not what I'm looking for. I only want the main Radial Menu script to effect the program I've set it up for, and disabled for all other windows.



joefango
  • Members
  • 56 posts
  • Last active: Jan 20 2018 02:44 PM
  • Joined: 02 Jun 2013


F4::
{
IfWinActive, ahk_class Notepad++
RMApp_MyRMHandler2(1, "r")
return
}

It works with this but it's surely not the best way cause SubMenus doesn't work.... sorry you have to wait a bit for a better response or try to check / study RM2 module if you have time...



Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
@madfx:
Thank you for kind words. ;)


I only want the main Radial Menu script to effect the program I've set it up for, and disabled for all other windows.

1. option - see OnRMShowHotkey event in RM help
2. option - turn BlackList into WhiteList; open RMApp lib.ahk, go to RMApp_RMShowHotkeyState() function, and replace Hotkey, IfWinNotActive with Hotkey, IfWinActive (2 times)
3. option - build your own app based on RM2module - study examples, especially:
Example 3 - Context-sensitive.ahk
Example 9 AHK_L - Menu definition in RMApp style.ahk
 
 

@joefango:
Thanks for kind words and sharing nice ideas and "dreams". ;)

... context-sensitive docks ... toggle ...


Study this code and adapt it to fit your needs. It makes 2 groups of docks; SciTEDocks and ShellDocks (taskbar), and pressing F1 showes or hides appropriate docks.
 
SciTEDocks := "2,4"
ShellDocks := "6,7"

F1::
IfWinActive, ahk_class SciTEWindow
	CustomDocksHnadler(SciTEDocks)
else IfWinActive, ahk_class Shell_TrayWnd
	CustomDocksHnadler(ShellDocks)
return

CustomDocksHnadler(DocksList) {
	VisCount := 0, InVisCount := 0
	Loop, parse, DocksList, `,
	{
		if (DllCall("IsWindowVisible", A_PtrSize ? "Ptr" : "UInt", RM2_Reg("M" A_LoopField "#HWND")) = 1)
			VisibleDocks .= A_LoopField ",", VisCount += 1
		else
			InVisibleDocks .= A_LoopField ",", InVisCount += 1
	}
	VisibleDocks := RTrim(VisibleDocks, ","), InVisibleDocks := RTrim(InVisibleDocks, ",")
	AllDocksList := RM2_Reg("DocksList")
	if (VisCount >= InVisCount)
		RM2_HideAllDocks()			; hides all docks
	else
		RM2_ShowDocks(DocksList) 	; shows a comma delimited list of docks and hides all other docks.
}

... with all these docks features I don't need the Main Radial Menu anymore. Is there a way to disable it but keep the RMShowHotkey ? (needed it for mouse gestures) ...

1. option - build your own app based on RM2module and Mouse gestures.
2. option - see OnRMShowHotkey event in RM help
3. option - open RMApp lib.ahk, go to RMApp_RMShowHotkey() function, and delete those 2 lines:
if (Gesture = RMShowMethod)
break

My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy


madfx
  • Members
  • 5 posts
  • Last active: Apr 09 2015 10:30 PM
  • Joined: 15 Jan 2014

Excellent, option #2 worked great. That was just what I was looking for, thanks!

 

One last question, is there a simple way to have the main radial menu open in response to multiple gesture directions? I want the main menu to appear from a "Up" motion as well as a "Down" motion. (not a combination up-down motion)  I'd like to reserve the "Left" and "Right" for special menus or functions.

 

I apologize if this was already asked or covered, this thread is massive and I'm still reading through it and finding helpful tricks.



joefango
  • Members
  • 56 posts
  • Last active: Jan 20 2018 02:44 PM
  • Joined: 02 Jun 2013

@madfx: Have you tried to add a mouse gesture in "My mouse gestures.ahk" ? To call a menu you need the prefix: MGA_

MGA_U() {
 RMApp_MyRMHandler2(1)
}



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

@madfx:
Open RMApp lib.ahk, go to RMApp_RMShowHotkey() function and replace this;

if (Gesture = RMShowMethod)
break

with this;

if Gesture in %RMShowMethod%
break

Now you'll be able to have both single and multiple directions as RMShowMethod. ;) Examples:
RMShowMethod = D
RMShowMethod = D,U
RMShowMethod = D,U,L,R


This feature will be built-in in upcoming RM update.

RMShowMethod = D,U will do what you want - it will call RM when you do "down" or "up" movement. ;)


My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy


madfx
  • Members
  • 5 posts
  • Last active: Apr 09 2015 10:30 PM
  • Joined: 15 Jan 2014

 

@madfx: Have you tried to add a mouse gesture in "My mouse gestures.ahk" ? To call a menu you need the prefix: MGA_

MGA_U() {
 RMApp_MyRMHandler2(1)
}

 

Yes, I had tried that initially but found that the submenus wouldn't work when called with that method.

 

@madfx:
Open RMApp lib.ahk, go to RMApp_RMShowHotkey() function and replace this;

if (Gesture = RMShowMethod)
break

with this;

if Gesture in %RMShowMethod%
break

Now you'll be able to have both single and multiple directions as RMShowMethod. ;) Examples:
RMShowMethod = D
RMShowMethod = D,U
RMShowMethod = D,U,L,R


This feature will be built-in in upcoming RM update.

RMShowMethod = D,U will do what you want - it will call RM when you do "down" or "up" movement. ;)

 

That did the trick, much thanks.

 

Just curious, is there a way to keep the radial menu (and current submenu) open after an item is clicked, so long as the RMShowHotkey is held down?

 

It would sort of be a hybrid of the click to select and release methods. Basically I'd like the radial menu open while the RMShowHotkey is down, closed when the RMShowHotkey is up. Submenu and item selections would be done with the RSMShowHotkey click, but without closing the radial menu (or submenu) if the RMShowHotkey remains down. Is that possible with the code now?



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

I like this idea very much and was thinking to implement it before. The current system is good when you have to select just one item from the menu, but in a situation when you want to select multiple items from the menu, this hybrid method would allow us to select multiple items much quicker and easier.
Is it possible? Yes, of course, but only if you modify internal codes. ;) This would be a little bit more complex modification, it's not that simple.

But I think I'll do it once when I'll have more free time.

This hybrid method should also check if [item which was selected by releasing RButton (RMShowHotkey) ] is equal to [last item which was selected by clicking with LButton (RSMShowHotkey) ] and ignore launching the same item 2 times.
I think it is natural/ergonomic to do LButton click and than release RButton above the same item and have just 1 (not 2) item launch, so user wouldn't have to move mouse away from the last "LButton clicked item" in order to avoid 2. item launch when he releases RButton...


* * *

By the way, regarding your earlier request; "I only want the main Radial Menu script to effect the program I've set it up for, and disabled for all other windows." ; I'm glad to hear that turning BlackList into WhiteList (IfWinNotActive --> IfWinActive ), works fine, but there is a change in upcoming RM update;

Black list.ahk will be abandoned, deleted, and replaced with a new file in My codes folder; My RMShowHotkey conditions.ahk

It gives user much more control over RMShowHotkey's context-sensitivity because Black list.ahk was using #IfWinNotActive and My RMShowHotkey conditions.ahk uses #If to regulate RMShowHotkey's context-sensitivity.

There's no reason to fear this change ;) If you want to prepare yourself, here's how My RMShowHotkey conditions.ahk will look like (with 5 examples included in the comments, where Example 3 demonstrates "WhiteList" effect);

Spoiler

My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy


Udris
  • Members
  • 2 posts
  • Last active: Feb 03 2014 09:40 AM
  • Joined: 26 Nov 2013

Hello, this is great aplication, thanks for that.

 

I try to make seperate aplication by using my own macros (scrips) and showing them using MouseGestures and RM2module.

 

As a base I use RM2module example nr.6 - Menu defination in RMApp style.ahk file examples...

 

ewerything works when I use this:

 

call Radial menu with keypress.

f1::oMenu1.Show("r")

Mouse gesture with some script in it also works

RButton::MG_Recognize()

MG_D() {
                MsgBox, test
}

but it stops working when I try to call radial menu using MouseGesture:

RButton::MG_Recognize()

MG_D() {
                oMenu1.Show("r")
}

oMenu1 is defined here

oMenu1 := new RM2Menu(MenuDefinition1)

thanks for any Help with this...



madfx
  • Members
  • 5 posts
  • Last active: Apr 09 2015 10:30 PM
  • Joined: 15 Jan 2014

Yeah, that new My RMShowHotkey conditions.ahk looks like it will be really straight forward and useful in practice. Goodbye Blacklist!

 

I will certainly be looking forward to that hybrid method. It would greatly increase the speed of interaction in my menus. (lots of incremental functions and toggles)



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

@Udris: Thanks for kind words. ( P.S. Did you send me a mail on 17.12.2013.? )


your seperate aplication ... RM2module + MouseGestures ... oMenu1.Show("r")

There are several problems in your approach;
1. Global variables. oMenu1 is not global, and MG_D() can't "see" it. There are a few solutions how to fix that, and one of them is to make super-global variable oMenu1 in a moment when you're creating a menu, for example; global oMenu1 := new RM2Menu(MenuDefinition1)

2. Mouse gestures + release to select method. In Radial menu 4 application, there are 2 kinds of mouse gestures; 1. Mouse gestures (ordinary), and 2. Mouse gestures alpha. Read about them in RM4 app help.

Mouse gestures in [module] Mouse gestures, which you are using in your stand-alone application, are like Mouse gestures (ordinary) in Radial menu 4 application and they can't be used in release to select method, because gesture function is fired when user releases a key. Due to facts that your RButton key is already released in a moment when you are calling a menu to show in release to select method, nothing will be showed nor selected.

You have 2 options:

1. use click to select method. Example:

MG_D() {
	oMenu1.Show("c") ; click to select
}

2. modify [module] Mouse gestures so it becomes like Mouse gestures alpha in Radial menu 4 application, and than you can use release to select method.


My Website • Recommended: AutoHotkey Unicode 32-bit • Join DropBox, Copy


Wickster
  • Members
  • 97 posts
  • Last active: Oct 06 2017 05:01 PM
  • Joined: 12 Jan 2013

updated my RM today to v4.39 and got this error and now it wont start. i dont know what to do. please help.

 

http://puu.sh/6Nue9.png