AutoHotkey Community

It is currently May 27th, 2012, 10:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 23rd, 2008, 3:59 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Introduction
A list is a collection of items with similar characteristics. This could be a list of colors, search parameters, folder names, file extensions, etc., etc. A list without associated properties can be referred to as a simple list. From a data perspective, a simple list is the equivalent of a one-field table or a one-dimensional array. After writing my 3rd or 4th GUI for managing a simple list, I decided to develop a reusable function to do the job.

The ListManagerGUI function has 4 primary modes of operation:
  1. Edit. As the name implies, this mode is for editing a list of items.
  2. Checklist. This mode is for editing a dynamic checklist. It works the same as the Edit mode except that the list includes the check/select status. Adding the check/select status to the table breaks the rules of a simple list but I needed it and I thought others might find it useful...
  3. Select. This mode is for selecting from a list of items.
  4. Display. Ah, you've figured out the pattern... This mode is for displaying a list of items.
The mode also determines what is returned from the function. For the Edit and Checklist modes, all list items are returned. For the Select mode, only the selected items are returned. For the Display mode, nothing is returned.

The function has large number options for customizing how the list is processed and how the window looks and operates. All of the options have been documented in the script.


Screenshots
ImageImageImage


The Code
The pertinent files are as follows:The example script includes a few static examples and "Custom" option that allows you to build your own example.


Issues/Considerations/Bugs
  • Prototype/Alpha release. Since this a preview release of the function, some of the code has not been optimized and there may be some residual debug code lying around. If there is any interest, these issues will be corrected in future releases.
  • Future stuff. The source may include documentation and/or code for (possible) future options (marked as "[Future]"). These options are either 1) not coded, 2) not working, or 3) have not been fully tested. Please do not use.
  • Functions. This script calls several other functions. For testing and evaluation purposes, the source for these functions has been included in the primary script. In future releases, some of these functions will be moved to separate modules.
  • Hotkey bugs. The ListManagerGUI script includes hotkey definitions. There is a known bug with defining hotkeys with key names that are synonyms to hotkeys that are used by this script. An example of key that has a synonym: Delete and Del. In an attempt at consistency, I tried to always use the longer key name or the name that is on most keyboards. For example: Insert, Delete, and Enter instead of Ins, Del, and Return.

    Although all of the ListManagerGUI hotkeys are context sensitive, this bug will stop one of the affected hotkeys from firing. The workaround is to change the hotkey key names in your script to match the hotkeys key names in this function (or vice versa). For more information, see this post: http://www.autohotkey.com/forum/viewtopic.php?t=26477.

Final Thoughts
Although the defaults in the code will probably work fine for most, they reflect my requirements. Please feel free to modify them for your use.

I hope that someone finds this useful.

---------------------------------------------------------------------------
v0.1 (Alpha/Preview):
Original release.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2008, 9:45 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Thank you. I always liked the way you do your stuff.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2008, 2:08 pm 
Wow, I'm impressed!

:o

Very readable code and very extensively documented.

The fact that you even built in a check for existing Gui's up to the extent of:

"Error. All 99/100 Gui windows are already in use!"

8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 29th, 2008, 9:42 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Currently, I have no use for your function/library. But it is good to know that something like this is available. I reply here to let you know, that I really like how you detailed documented. Looks very good and thx.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 36 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