Radial menu scripts
Re: Radial menu scripts
@lotion: Yes you can as explained in my previous post
Re: Radial menu scripts
hey, thanks for your response.
I wanna insert the following text passage: I, Bmf, F2, Cp
I dont understand what write into my functions.ahk after reading your previous post.
something like this: Action= fun Send|{I, Bmf, F2, Cp} ?
*edit
Ok, I have now added
Send(What) {
Send, %What%
return
}
to my functions.ahk. Then I added in the menu designer an item with the Action= fun Send|{I, Bmf, F2, Cp}
Unfortunately this does not seem to work.
I wanna insert the following text passage: I, Bmf, F2, Cp
I dont understand what write into my functions.ahk after reading your previous post.
something like this: Action= fun Send|{I, Bmf, F2, Cp} ?
*edit
Ok, I have now added
Send(What) {
Send, %What%
return
}
to my functions.ahk. Then I added in the menu designer an item with the Action= fun Send|{I, Bmf, F2, Cp}
Unfortunately this does not seem to work.
Re: Radial menu scripts
In MyFunction.ahk you need that:
And in the item action
You can find keys reference here: https://autohotkey.com/docs/commands/Send.htm
Code: Select all
Send(What) {
Send, %What%
return
}
Code: Select all
Action= fun Send|I,{Space}Bmf,{Space}F2,{Space}Cp
Re: Radial menu scripts
Thank you for the informative link and your correction. It works perfectly now.
Re: Radial menu scripts
@Joefango
1) Thanks for explaining that, I managed to get the Search button to working (^f), but none of the media buttons are responding (Play/Pause, Next, Previous, Stop or Mute). My media player was open and I had a track playing, but no button would respond. The media keys on the computer hardware are controlling the player just fine, but RM is having no effect. Before RM, I used AHK to control the media keys, so i know it can be done..
3) That worked perfectly! I noticed this only works on programs that are already open, not ones that are closed. Do you know of any code that can open a program if its not already open, and if it is open, open the existing one instead? If you have no idea, that's okay :]
@Learning one
Using Run doesn't work, it does nothing. RM still renames 'Program Files (x86)' to %A_ProgramFiles%' in the path: Run, %A_ProgramFiles%\Audacity\audacity.exe
As for the message suggestion, after hitting 'No' I would just close the program.. no message.
Thanks for the recommendation, I use Notepad++ but have been using Notepad because it's slightly less chaotic to look at
1) Thanks for explaining that, I managed to get the Search button to working (^f), but none of the media buttons are responding (Play/Pause, Next, Previous, Stop or Mute). My media player was open and I had a track playing, but no button would respond. The media keys on the computer hardware are controlling the player just fine, but RM is having no effect. Before RM, I used AHK to control the media keys, so i know it can be done..
3) That worked perfectly! I noticed this only works on programs that are already open, not ones that are closed. Do you know of any code that can open a program if its not already open, and if it is open, open the existing one instead? If you have no idea, that's okay :]
@Learning one
Using Run doesn't work, it does nothing. RM still renames 'Program Files (x86)' to %A_ProgramFiles%' in the path: Run, %A_ProgramFiles%\Audacity\audacity.exe
As for the message suggestion, after hitting 'No' I would just close the program.. no message.
Thanks for the recommendation, I use Notepad++ but have been using Notepad because it's slightly less chaotic to look at
Re: Radial menu scripts
1) I just tested on vlc and mediaplayer and it works fine here. The window have to be active. is it the case ?
3)
1 - you need to check if a process or a window exist. You have many way to do that by using following commands:
IfWinExist that check if a window exist https://autohotkey.com/docs/commands/WinExist.htm (recommended)
IfWinNotExist the same inverted https://autohotkey.com/docs/commands/WinExist.htm
Process https://autohotkey.com/boards/posting.p ... 78#preview
2) If your process or window exist you have to "WinActivate" it : https://autohotkey.com/docs/commands/WinActivate.htm
3) Else you need to "Run" it: https://autohotkey.com/docs/commands/Run.htm
Try to mess a bit with that and I will perform script corrections
3)
I was a little confused by the request... This is normal you need to tell autohotkey to check if a process or a window already exist. it's a good exercise for you to learn how to do that because it is the basics:3) How do you open a process that already exists, without starting a new one?
1 - you need to check if a process or a window exist. You have many way to do that by using following commands:
IfWinExist that check if a window exist https://autohotkey.com/docs/commands/WinExist.htm (recommended)
IfWinNotExist the same inverted https://autohotkey.com/docs/commands/WinExist.htm
Process https://autohotkey.com/boards/posting.p ... 78#preview
2) If your process or window exist you have to "WinActivate" it : https://autohotkey.com/docs/commands/WinActivate.htm
3) Else you need to "Run" it: https://autohotkey.com/docs/commands/Run.htm
Try to mess a bit with that and I will perform script corrections
Re: Radial menu scripts
1) Nevermind I figured this one out. I'm using the Google Play Music Desktop Player: http://www.googleplaymusicdesktopplayer.com/, it works with media keys. I just learned I could set custom hotkey functions inside it, and that's what I did. It works now :]
3) Would this work?
ActiveProcess(Process)
{
SetTitleMatchMode, 2 ; what does this mean?
IfWinExist, %Process%
WinActivate, %Process%
IfWinNotExist, %Process%
Run, %A_WinDir%\system32\mspaint.exe
}
Return
Text=
Icon= Paint.png
Action= fun ActiveProcess|Paint
Tooltip= Paint
I imagine I'm gonna have to set this up for every exe, but I'm not sure how to set up the variable to do this:
ActiveProcess(Process)
{
SetTitleMatchMode, 2
IfWinExist, %Process%
WinActivate, %Process%
IfWinNotExist, %Process%
Run, %A_WinDir%\system32\mspaint.exe
Run, %A_WinDir%\notepad.exe
Run, etc etc...
}
Return
3) Would this work?
ActiveProcess(Process)
{
SetTitleMatchMode, 2 ; what does this mean?
IfWinExist, %Process%
WinActivate, %Process%
IfWinNotExist, %Process%
Run, %A_WinDir%\system32\mspaint.exe
}
Return
Text=
Icon= Paint.png
Action= fun ActiveProcess|Paint
Tooltip= Paint
I imagine I'm gonna have to set this up for every exe, but I'm not sure how to set up the variable to do this:
ActiveProcess(Process)
{
SetTitleMatchMode, 2
IfWinExist, %Process%
WinActivate, %Process%
IfWinNotExist, %Process%
Run, %A_WinDir%\system32\mspaint.exe
Run, %A_WinDir%\notepad.exe
Run, etc etc...
}
Return
Re: Radial menu scripts
1) No it works only if the window is active, to send keys on a background running app you need to use an other command named ControlSend: https://autohotkey.com/docs/commands/ControlSend.htm.
You need to learn how we can find or identify windows by looking here: https://autohotkey.com/docs/misc/WinTitle.htm
3) No but you made some progress, here is a script that will work:
Then in the item action
Of course you can make it "universal" using variables
The in item action:
You need to learn how we can find or identify windows by looking here: https://autohotkey.com/docs/misc/WinTitle.htm
3) No but you made some progress, here is a script that will work:
Code: Select all
ActivateOrRunChrome()
{
SetTitleMatchMode, 2 ;Set the matching behavior to find a window. mode 2 means autohotkey will look in all the tittle to find the words specified
IfWinExist, Google Chrome ; there is always "Google Chrome" words somewhere in the tiitle of the chrome window so I want to look at it
WinActivate, Google Chrome ; Activate the found window
Else Run, "C:\your\path\tochrome.exe"
}
Return
Code: Select all
Action= fun ActiveOrRunChrome
Code: Select all
ActivateOrRunMyApp(Which,Path) ;note that we are using 2 parameters
{
SetTitleMatchMode, 2
IfWinExist, %Which%
WinActivate, %Which%
Else Run, %Path%
}
Return
Code: Select all
Action= fun ActivateOrRunMyApp|Google Chrome|"YourPathToChrome.exe"
Code: Select all
Action= fun ActivateOrRunMyApp|Paint|"YourPathToPaint.exe"
Re: Radial menu scripts
Yesterday I had edited the post above to mention that the Google Music player i use actually has customizeable hotkeys built-in, so that took care of the media buttons. For anyone interested, the hotkeys can only be set with ctrl:
The examples you wrote for the window processes are perfect, they work great and reviewing them has been very educational to me!
I'm very thankful for your help, you've been patient with me and I really appreciate that
The examples you wrote for the window processes are perfect, they work great and reviewing them has been very educational to me!
I'm very thankful for your help, you've been patient with me and I really appreciate that
- metacognition
- Posts: 117
- Joined: 22 Oct 2014, 05:57
- Location: Alaska
- Contact:
Re: Radial menu scripts
@L1:
Thanks for you responses. You are a scholar and a gentleman.
Hope you are feeling better.
Best,
Meta.
Thanks for you responses. You are a scholar and a gentleman.
Hope you are feeling better.
Best,
Meta.
Re: Radial menu scripts
Just want to thank you for Radial Menu!
Three days of having fun programming ) A great tool!
Three days of having fun programming ) A great tool!
Re: Radial menu scripts
Dear Learning One,
This is awesome. A great piece of software. Thank you very much for sharing it. I'm heavily impressed by the designer and ease of use.
This is awesome. A great piece of software. Thank you very much for sharing it. I'm heavily impressed by the designer and ease of use.
ciao
toralf
toralf
Re: Radial menu scripts
Have been playing around with Radial menu and I really love it. Thanks for putting this together and job well done.
I have been trying to understand the "context sensitive" aspect of using this application but cannot find anything to support this.
Can you explain?
Cheers,
David
I have been trying to understand the "context sensitive" aspect of using this application but cannot find anything to support this.
Can you explain?
Cheers,
David
Re: Radial menu scripts
hi,
Have you read the nice documentation made by L1 ? basically you can create additional menus and show them according to the application you are using. Say you are working on paint you can have a menu for paint,using notepad you can have a menu for notepad, webrowser,etc...
I use it a lot while working with applications that requires many functions, or if you have repetitive boring tasks to do every time
Have you read the nice documentation made by L1 ? basically you can create additional menus and show them according to the application you are using. Say you are working on paint you can have a menu for paint,using notepad you can have a menu for notepad, webrowser,etc...
I use it a lot while working with applications that requires many functions, or if you have repetitive boring tasks to do every time
Re: Radial menu scripts
I need to make my right click menu context sensitive, but I don't know what to edit. The best I got is making it a shortcut in My hotkeys.ahk:
I want the same functionality on my normal right click.
Code: Select all
F7::
MouseGetPos,,, hWinUnderMouse
WinGetClass, WinUnderMouseClass, % "ahk_id " hWinUnderMouse
if WinUnderMouseClass in Photoshop
MenuToShow := 56
else
MenuToShow := 57
RMApp_MyRMHandler2(MenuToShow)
return
Re: Radial menu scripts
Hello,
Maybe the right click is set for the main menu and you can't override it to show your context sensitive menu ?... In this case try to delete the RMShowHotkey in the general settings and you should have the ability to bind your menus to the right click
Maybe the right click is set for the main menu and you can't override it to show your context sensitive menu ?... In this case try to delete the RMShowHotkey in the general settings and you should have the ability to bind your menus to the right click
Re: Radial menu scripts
Making it a right mouse button hotkey in My hotkeys.ahk overwrites the mouse RButton so no right click any more, also I can't make the select method "click" as per the general settings.
Actually now that I look at it, the submenus of my code don't work either.
I just need the default right click-drag-down menu to be context sensitive (with window under mouse method). I am not a coder so... anything helps, especially which file has the code for this thing.
Actually now that I look at it, the submenus of my code don't work either.
I just need the default right click-drag-down menu to be context sensitive (with window under mouse method). I am not a coder so... anything helps, especially which file has the code for this thing.
Re: Radial menu scripts
I'm not a good coder also, but from what I know the main menu and additional menus like yours (56,57) are not working the same way. for instance Submenus are not available with additional menus.
If you want to use context sensitive menus(without submenu feature) and with the 'right click drag down', I think you need first to change the RMShowMethod to "U" then you can use the mouse gesture down to show your context sensitive menus
Let me know if you can deal with that
If you want to use context sensitive menus(without submenu feature) and with the 'right click drag down', I think you need first to change the RMShowMethod to "U" then you can use the mouse gesture down to show your context sensitive menus
Let me know if you can deal with that
Re: Radial menu scripts
quick question....I know autohotkey can detect which window is or program is focused - is it possibe to have radial menu only work when a certain program is open, such as Cubase?
- metacognition
- Posts: 117
- Joined: 22 Oct 2014, 05:57
- Location: Alaska
- Contact:
Re: Radial menu scripts
This would be a good start:
https://autohotkey.com/docs/commands/_IfWinActive.htm
Or this
The above code would be immediately after a hotkey declaration.
It would check if the "process.exe" is running
You would replace "process.exe" with whatever cubase exe name is... then call your function or subroutine from in brackets.
https://autohotkey.com/docs/commands/_IfWinActive.htm
Or this
Code: Select all
Process, Exist, process.exe
if(errorlevel)
{
; do stuff here
}
It would check if the "process.exe" is running
You would replace "process.exe" with whatever cubase exe name is... then call your function or subroutine from in brackets.
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 187 guests