AutoHotkey Community

It is currently May 26th, 2012, 5:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: AHKControl
PostPosted: February 14th, 2008, 2:41 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
Press Win+Q to show:

Image

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 December 30th, 2008, 1:28 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 3:05 am 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
You got some good stuff, I hope you know that.
:D


Last edited by ahklerner on February 14th, 2008, 3:19 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 3:19 am 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
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! :)

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 5:20 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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. :lol:
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 5:51 am 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 10:37 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 14th, 2008, 6:54 pm 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 12:04 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 12:28 pm 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 12:50 pm 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 11:13 am 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 11:40 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2008, 11:45 am 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
Thanks for the clarifications.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2008, 12:08 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
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)

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2008, 1:39 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, Google Feedfetcher and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group