AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHKControl
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Thu Feb 14, 2008 1:41 am    Post subject: AHKControl Reply with quote

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
View user's profile Send private message Visit poster's website
ahklerner



Joined: 26 Jun 2006
Posts: 1381
Location: USA

PostPosted: Thu Feb 14, 2008 2:05 am    Post subject: Reply with quote

You got some good stuff, I hope you know that.
Very Happy


Last edited by ahklerner on Thu Feb 14, 2008 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1381
Location: USA

PostPosted: Thu Feb 14, 2008 2:19 am    Post subject: Reply with quote

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! Smile
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Thu Feb 14, 2008 4:20 am    Post subject: Reply with quote

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. Laughing
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
View user's profile Send private message Visit poster's website
ManaUser



Joined: 24 May 2007
Posts: 1121

PostPosted: Thu Feb 14, 2008 4:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Thu Feb 14, 2008 9:37 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
automaticman



Joined: 27 Oct 2006
Posts: 642

PostPosted: Thu Feb 14, 2008 5:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Thu Feb 14, 2008 11:04 pm    Post subject: Reply with quote

automaticman wrote:
Also interesting would be to rewrite the menu with the new menu control here:
http://www.autohotkey.com/forum/viewtopic.php?t=17674
What would MMenu offer that the script doesn't already have?
Back to top
View user's profile Send private message Visit poster's website
automaticman



Joined: 27 Oct 2006
Posts: 642

PostPosted: Fri Feb 15, 2008 11:28 am    Post subject: Reply with quote

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
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 642

PostPosted: Fri Feb 15, 2008 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 642

PostPosted: Fri Feb 22, 2008 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Fri Feb 22, 2008 10:40 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
automaticman



Joined: 27 Oct 2006
Posts: 642

PostPosted: Fri Feb 22, 2008 10:45 am    Post subject: Reply with quote

Thanks for the clarifications.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Tue Feb 26, 2008 11:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Lexikos



Joined: 17 Oct 2006
Posts: 7291
Location: Australia

PostPosted: Wed Feb 27, 2008 12:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group