DonationCoder.com Software > Post New Requests Here
IDEA: Dynamic context menu for any application
bgjensen:
Are there a program that can create custom context menus for any program, that can send command to the program.
Example: Press a hotkey in your browser, notepad or windows explorer, and a context menu with commands (you have specified in an ini file) pops up and then sends the selected command to the program (CTRL+J, ALT+K and so on).
Like Skrommel's Barnacle but with a context menu instead of buttons.
Ath:
Hm, not exactly right, but could be a start:
WinButtons can present buttons on screen, Application-context sensitive if you want, and can use WinSendKeys to send keystrokes, mouseclicks and clipboard (text) contents to a specific or the currently active application.
Now just a (system-wide?) hotkey to load WinButtons, and you'd be fine :D
I could add that as a feature, I guess, if WinButtons is anything near what you'd like?
skwire:
Are there a program that can create custom context menus for any program, that can send command to the program.-bgjensen (January 10, 2012, 03:05 PM)
--- End quote ---
I don't know of any but here's a basic AutoHotkey framework that you can extend:
--- Code: Autohotkey ---SetTitleMatchMode, 2 ; Create dummy menu so we can delete it and; create the context-sensitive one later.Menu, cMenu, Add, Dummy, DummyDummy: ; Dummy labelReturn Return ; End of auto-execute section. #IfWinActive, Firefox{ #v:: ; Win+v hotkey. { ; Delete current menu. Menu, cMenu, Delete ; Build app-specific menu. Menu, cMenu, Add, Show downloads, menuFirefox Menu, cMenu, Add, Organize bookmarks, menuFirefox ; Show the menu at the mouse pointer. Menu, cMenu, Show } Return}#IfWinActive #IfWinActive, Notepad{ #v:: ; Win+v hotkey. { ; Delete current menu. Menu, cMenu, Delete ; Build app-specific menu. Menu, cMenu, Add, Find, menuNotepad Menu, cMenu, Add, Select all, menuNotepad ; Show the menu at the mouse pointer. Menu, cMenu, Show } Return}#IfWinActive menuFirefox:{ If ( A_ThisMenuItem = "Show downloads" ) { SendInput, ^j } Else If ( A_ThisMenuItem = "Organize bookmarks" ) { SendInput, ^+b }}Return menuNotepad:{ If ( A_ThisMenuItem = "Find" ) { SendInput, {F3} } Else If ( A_ThisMenuItem = "Select all" ) { SendInput, ^a }}Return
Ath:
Nice, skwire, I expected something like that :D
skwire:
Nice, skwire, I expected something like that :D-Ath (January 10, 2012, 04:28 PM)
--- End quote ---
Thanks. Stuff like this is easy in AHK. However, creating a GUI for something like this would be much more work than the actual guts of the code. I hope the original poster can get some use of that framework; I tried to make it logical and easy to follow.
Navigation
[0] Message Index
[#] Next page
Go to full version