| View previous topic :: View next topic |
| Author |
Message |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Thu Feb 14, 2008 1:41 am Post subject: AHKControl |
|
|
Press Win+Q to show:
Not pictured above; Edit shows a menu with the script directory at the top, followed by the script and all #includes and stdlib auto-includes, in the order they are included. (Shift+click to bypass the menu and edit the selected script.)
An icon is shown for any script that has a tray icon.
Required:
ListIncludes.ahk (placed in function library)
Menu Icons v2
AHKControl.ahk
Covered by Lexikos' default copyright license.
Last edited by Lexikos on Tue Dec 30, 2008 12:28 am; edited 1 time in total |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1381 Location: USA
|
Posted: Thu Feb 14, 2008 2:05 am Post subject: |
|
|
You got some good stuff, I hope you know that.

Last edited by ahklerner on Thu Feb 14, 2008 2:19 am; edited 1 time in total |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1381 Location: USA
|
Posted: Thu Feb 14, 2008 2:19 am Post subject: |
|
|
I have 3 suggestions for you consider.
-Do not show menu items that are not available for that file. (I get a menu option to 'View Variables' for a compiled script that I have running, for example)
-Have a variable for a custom editor (for portability)
-Have a variable for a custom file manager.
Thanks for sharing another great script!  _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Thu Feb 14, 2008 4:20 am Post subject: |
|
|
| ahklerner wrote: | -Do not show menu items that are not available for that file. (I get a menu option to 'View Variables' for a compiled script that I have running, for example)
| "View Variables" and similar can't simply be excluded for all compiled scripts, since they may have been enabled via:
| Code: | Menu, Tray, MainWindow
| It should be possible to detect this by checking if the relevant menu items are enabled in the script's main window's menus, but since I don't use compiled scripts, it didn't seem worth the effort.
| Quote: | -Have a variable for a custom editor (for portability)
| Good idea. I have portable SciTE, but end up using Notepad.
| Quote: | -Have a variable for a custom file manager.
| I'd have no need for the option, but I'll consider adding it when I get around to working on the script.
I actually didn't intend to release the script, but someone asked me to. (If I am the only user, it is easier to edit the script directly than to implement options.)
For now, the editor and file manager can be customized by editing the OpenIncludeFile and OpenScriptDir subroutines, respectively. |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 1121
|
Posted: Thu Feb 14, 2008 4:51 am Post subject: |
|
|
| Thanks for sharing this. I thought it sounded handy too. And I see it works even for scripts that don't have tray icons. It will be especially useful in that case or any time I have several scripts open that all use the default tray icon. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Thu Feb 14, 2008 9:37 am Post subject: |
|
|
Script updated:
- Two options now appear at the top of the script: BrowseAction and EditAction.
- The default BrowseAction selects the script rather than simply opening the folder as before.
- Edit and View menu items are no longer shown for compiled scripts.
- If a script has a tray icon, its tooltip is used as the menu item name.
- Exiting AHKControl from the AHKControl.ahk submenu no longer shows a prompt. (Now that I think of it, exiting AHKControl accidentally is bothersome, so maybe it should prompt.)
- Exiting from the main menu gives you the option to close all running scripts.
| lexiKos wrote: | "View Variables" and similar can't simply be excluded for all compiled scripts, since they may have been enabled via:
| Code: | Menu, Tray, MainWindow
|
| Apparently no-one ever uses that, or they'd have noticed it doesn't actually enable the menu items! |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 642
|
Posted: Thu Feb 14, 2008 5:54 pm Post subject: |
|
|
Thanks lexiKos for sharing that, too! I'll try it in some hours, have to go right now. Also interesting would be to rewrite the menu with the new menu control here:
http://www.autohotkey.com/forum/viewtopic.php?t=17674 |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Thu Feb 14, 2008 11:04 pm Post subject: |
|
|
| What would MMenu offer that the script doesn't already have? |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 642
|
Posted: Fri Feb 15, 2008 11:28 am Post subject: |
|
|
| lexiKos wrote: | | What would MMenu offer that the script doesn't already have? | I don't know. I just thought I'll add the comment here to connect these two threads as there should be also a reason for MMenu. Maybe other MMenu users would know the difference? |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 642
|
Posted: Fri Feb 15, 2008 11:50 am Post subject: |
|
|
| lexiKos, AHKControl is great. It's menu system could be even nicely combined with nDroid, if nDroid should get more and more new Actions and Scans and other stuff also maybe. |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 642
|
Posted: Fri Feb 22, 2008 10:13 am Post subject: |
|
|
| What do you think of extending AHKControl with the following feature: Right now we can see for each running ahk-code among others it's hotkeys with "View Hotkeys" but we don't have the possibility to get a list of all hotkeys in all running ahk-codes. An option like "View Hotkeys of All running ahk-codes" would be useful or is there already a workaround which I've overlooked? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Fri Feb 22, 2008 10:40 am Post subject: |
|
|
| automaticman wrote: | | What do you think of extending AHKControl with the following feature: | It isn't a feature I would use.
| Quote: | | Right now we can see for each running ahk-code among others it's hotkeys with "View Hotkeys" | ...because the function is already there. AHKControl merely sends a message to the script in question. |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 642
|
Posted: Fri Feb 22, 2008 10:45 am Post subject: |
|
|
| Thanks for the clarifications. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Tue Feb 26, 2008 11:08 pm Post subject: |
|
|
| lexiKos wrote: |
[*]Edit and View menu items are no longer shown for compiled scripts.
|
Perhaps an additional option: It could allow view and edit if the ahk file of the same name is in the same folder as the exe. This requires asking the process where it started from, but I think Skan wrote some code for that.
Cool script!
I should adapt it to start other scripts in a known location, like my old launcher script (that my wife still uses) _________________
(Common Answers) |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7291 Location: Australia
|
Posted: Wed Feb 27, 2008 12:39 am Post subject: |
|
|
| engunneer wrote: | | Perhaps an additional option: It could allow view and edit if the ahk file of the same name is in the same folder as the exe. | Good idea. (edit: "Edit", yes. "View" applies only to running scripts, and the associated features are normally disabled in compiled scripts.)
| Quote: | | This requires asking the process where it started from, | Actually, the full path of the compiled script can be retrieved from the main window's title. The title is how I differentiate between compiled and uncompiled scripts. Compiled scripts also omit the " - AutoHotkey vVersionNumber" from the title.
| Quote: | | I should adapt it to start other scripts in a known location, | I planned to add that months ago, but never did since I usually launch via the editor, ACConsole or quick launch (with Vista's Win+Num shortcuts.)
Ideally you could set the access key (&1. ScriptName -> Script&Name) for such scripts, whether they are running or not. This way you can interact with a given script without needing to know where it is in the menu. |
|
| Back to top |
|
 |
|