Jump to content


Photo

Ahk Standard Library Collection, 2010 Sep (+Gui) ~ Libs: 100


  • Please log in to reply
85 replies to this topic

#1 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 25 February 2010 - 07:59 PM

Database
Timestamp: 2010-09-18
Libraries: 100
Ahk Compatible: Vanilla / Mainstream

Download (~1.2 MB)
The archive contains all files and no other download is needed.
Posted Image LICENSE: Please note, the script itself is GNU GPL licensed. The source code must be open, if you publish modified source of this script. See <!-- m -->http://en.wikipedia...._Public_License<!-- m -->

Attention: The libraries have all its own licenses.

Look at this: amnesiac made a custom build of the AHK Basic documentation, with the integration of the libraries I listed here. It is in the .chm format and available for download. See AHK Basic documentation with Standard Library

Table of Content (for this post)
[*:3lp4fenv]Description
[*:3lp4fenv]Database in ini format
[*:3lp4fenv]Call for all library and function developers
[*:3lp4fenv]List of used prefixes and filenames
[*:3lp4fenv]See also, more material
Description

This is my first attempt of creating a collection and sharing of stdlib compatible libraries. It does contain the source, if available a documentation, if available the license text, one sample per lib and some other notes, like if it is strictly stdlib conform (no globals in use etc.).

All these information are collected by hand into one place and saved in an ini file. The associated files can be found as a flat filesystem. The default Gui default script, which is provided with the database, makes it very easy to test the scripts without installing something. It shows buttons for opening the forum posts and the related documentation.

From time to time, I will add more and more libraries, which I find good enough for this. Some libraries I am interested in are not included, because they are not stdlib compatible or easily usable/installable because of some conflicts, i.e. majkinetors Forms Framework.

Posted Image
Screenshot may be outdated. Sorry.

Database in ini format

Any suggestion is welcome. If you like, post your favorite library not listed in the database in following format:
[0]
GUID=regex("\w{8}-\w{4}-\w{4}-\w{4}-\w{12}") ; Generated with Titan`s uuid.ahk
Abstract={string}
Description={string}
Prefix=regex("\w+")
Date=regex("\d+") ; yyyymmdd
Revision={string}
Author={csv}
Discussion={url}
Source={url}
Documentation={url}
Sample={url}
License={string}
LicenseSource={url}
Category={csv}
Standalone="yes|no"
StdLibConform="yes|no"
Dependency={csv} ; filename: GUID
Notes={string}

Not all keys/fields must be present. As an example, look at this:
[4]
GUID=f24c8170-955e-126a-98a5-19ac76b08d4a
Abstract=Text file & Variables/String Library
Description=As the name suggest this is a AHK Library with a number of functions to "manipulate" text, both files such as *.txt, *.ahk, *.html, *.css etc AND Strings (or variables). It is NOT useful for binary files or data such as MS Office files, PDFs, EXEcutables, images etc.
Prefix=TF
Date=20100416
Revision=3.3
Author=hugov
Discussion= http://www.autohotkey.com/forum/viewtopic.php?t=46195
Source=tf.ahk
Documentation=tf.htm
Sample=tf_demo.ahk
Category=FileSystem, Text, Strings
Standalone=yes
StdLibConform=no
Notes=It is not strictly stdlib conform, because globals are in use.

I will check and verify that, before it gets added into the database.

Call for all library and function developers


If you are a developer of any function, then have it in mind others could use it with the stdlib mechanism. Every function should reside in a library (that is a file containing functions only). A library is stdlib compatible, if the main usable functions lead to automatically inclusion of the library.

Names: To avoid possible conflict, please see what others have done and which function names and prefixes they uses. Different libraries cannot share same set of names.
Script: Please do provide the needed information in a standardized way if it is possible. Most important infos which I cannot guess often are the date of last edit and the version. At least, one of them should be available.
Official example scripts would be good to have, but it is not required. If there is no one, I`ll create one.
What you should do allways is, making an external documentation. It does not need to cover every aspect, begin to write down the most important informations first.
License: And I beg you, please make a notice about what license your script uses. That is an often neglected part, which can cause serious problems. I recommend the GNU Lesser General Public License.
I found that related page: How to choose a free software license.

List of used prefixes and filenames

The prefix is the filename also. If a library does not have a prefix, duo to the fact it have only one function, then the file is named after the function without a prefix. In example Anchor.ahk does have one function named Anchor(). And the library ini.ahk have many functions prefixed with "ini_", i.e. ini_getValue().
For compatibility with these, you should choose another name for your files than these and another prefix (here in alphabetical order):
Count: 100[*:3lp4fenv]A
[*:3lp4fenv]Affinity
[*:3lp4fenv]AHKHID
[*:3lp4fenv]AHKsock
[*:3lp4fenv]Align
[*:3lp4fenv]Anchor
[*:3lp4fenv]argp
[*:3lp4fenv]baseConvert
[*:3lp4fenv]CColor
[*:3lp4fenv]cdomessage
[*:3lp4fenv]CMDret
[*:3lp4fenv]CMDret_stream
[*:3lp4fenv]com
[*:3lp4fenv]ConnectedToInternet
[*:3lp4fenv]ConsoleApp
[*:3lp4fenv]Crypt
[*:3lp4fenv]DamerauLevenshteinDistance
[*:3lp4fenv]DateParse
[*:3lp4fenv]Delay
[*:3lp4fenv]difference
[*:3lp4fenv]Dlg
[*:3lp4fenv]dll
[*:3lp4fenv]Dock
[*:3lp4fenv]DockA
[*:3lp4fenv]Edit
[*:3lp4fenv]EmptyMem
[*:3lp4fenv]Eval
[*:3lp4fenv]Exec
[*:3lp4fenv]File
[*:3lp4fenv]FileExtract
[*:3lp4fenv]FileGetVersionInfo
[*:3lp4fenv]fileIsBinary
[*:3lp4fenv]Font
[*:3lp4fenv]ftp
[*:3lp4fenv]Functions
[*:3lp4fenv]Gdip
[*:3lp4fenv]GetAvailableFileName
[*:3lp4fenv]GetCommonPath
[*:3lp4fenv]grep
[*:3lp4fenv]HLink
[*:3lp4fenv]Hotstrings
[*:3lp4fenv]HtmDlg
[*:3lp4fenv]httpQuery
[*:3lp4fenv]HttpQueryInfo
[*:3lp4fenv]ILButton
[*:3lp4fenv]ini
[*:3lp4fenv]InternetFileRead
[*:3lp4fenv]IsFullScreen
[*:3lp4fenv]json
[*:3lp4fenv]LetUserSelectRect
[*:3lp4fenv]MCI
[*:3lp4fenv]MCode
[*:3lp4fenv]md5
[*:3lp4fenv]mg
[*:3lp4fenv]MI
[*:3lp4fenv]Mount
[*:3lp4fenv]msTill
[*:3lp4fenv]Notify
[*:3lp4fenv]pgArray
[*:3lp4fenv]ping
[*:3lp4fenv]PixPut
[*:3lp4fenv]ProcessInfo
[*:3lp4fenv]QPX
[*:3lp4fenv]Rand
[*:3lp4fenv]RandomUniqNum
[*:3lp4fenv]Rebar
[*:3lp4fenv]regionGetColor
[*:3lp4fenv]RemoteBuf
[*:3lp4fenv]RichEdit
[*:3lp4fenv]RPath
[*:3lp4fenv]SB
[*:3lp4fenv]sc
[*:3lp4fenv]ShellFileOperation
[*:3lp4fenv]ShowMenu
[*:3lp4fenv]Splitter
[*:3lp4fenv]st
[*:3lp4fenv]StdoutToVar
[*:3lp4fenv]StrGet
[*:3lp4fenv]StrPut
[*:3lp4fenv]strTail
[*:3lp4fenv]StrX
[*:3lp4fenv]sXMLget
[*:3lp4fenv]TaskButton
[*:3lp4fenv]tf
[*:3lp4fenv]ThousandsSep
[*:3lp4fenv]Toolbar
[*:3lp4fenv]ToolTip
[*:3lp4fenv]TrayIcon
[*:3lp4fenv]TVX
[*:3lp4fenv]type
[*:3lp4fenv]UnHTM
[*:3lp4fenv]USBD
[*:3lp4fenv]uuid
[*:3lp4fenv]VA
[*:3lp4fenv]WaitPixelColor
[*:3lp4fenv]WatchDirectory
[*:3lp4fenv]Win
[*:3lp4fenv]WinServ
[*:3lp4fenv]xpath
[*:3lp4fenv]yaml
See also, more material

Some tools using this "Ahk Standard Library Collection" as backend or base information center:
[Basic]AutoHotkey Help with Standard Library
These are not included. Either they are not tested. not compatible with my collection or need non standard DLL files:
LowLevel & dynamic code
Forms Framework
MS Office Automation Functions
.NET Framework Interop
Embedded Windows Scripting (VBScript & JScript) and COM
PPJoy library
Voice Recognition COM
WinTraymin to trayicon
Clock + cpu and memory usage
Interesting helper stuff for coders:
MCodeGen - Easily transform C/C++ code into mcode
Scriptlet Library
Easy Script Block Editor
WinAPI Listing [New Version]
U T e s t

#2 Learning one

Learning one
  • Members
  • 1296 posts

Posted 25 February 2010 - 08:17 PM

Fantastic! Thank You! Continue this great project! :)

#3 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 25 February 2010 - 08:34 PM

Thx for your encouragement. I made this to easier share our loved and often used libraries that everyone should know the existence of them. Hope more people find it useful.

One thing that bugged me allways is, that even our more great scripters dont specify a license. Also often there is no explicit date or version numbering founded. AND even sometimes it lacks a documentation!

#4 entropic

entropic
  • Members
  • 181 posts

Posted 26 February 2010 - 02:15 AM

Excellent program.

My only suggestion would be to have an install all option.

#5 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 26 February 2010 - 03:10 AM

Ah install all... hmm may be i add that option. Does make it sense?
I have some other ideas like search and filter features. But that is not that important to me. The main focus is not the Library Explorer script, but the collection itself.

#6 toralf

toralf
  • Fellows
  • 3948 posts

Posted 26 February 2010 - 03:13 PM

Hi Tuncay,

That is brilliant. Thanks a lot. I'll use it.
It should have link to update itself, or at least a link to its own forum post.

#7 Lexikos

Lexikos
  • Administrators
  • 8856 posts

Posted 26 February 2010 - 03:36 PM

Nicely presented GUI and script.

I think the ini database would be easier to maintain if it identified the sections as [Lib LibFileNameNoExt] or similar rather than using sequential numbering. Here's one method (complete working example):
/*
[Lib $]
Abstract = Function Collection
[Lib Functions]
Abstract = Command Functions
[Lib INI]
Abstract = Basic Ini String Library
[Lib TF]
Abstract = Text file & Variables/String Library
*/

; Allocate a buffer likely big enough to hold all section names.
VarSetCapacity(names, 4096)
; Retrieve all section names.
DllCall("GetPrivateProfileSectionNames", "str", names
        , "uint", VarSetCapacity(names)//t_size()
        , "str", A_ScriptFullPath)

p := &names
; For each null-terminated substring up to the double-null-terminator ...
while (s := StrGet(p)) != ""
{
    ; Skip non-Lib sections.
    if SubStr(s,1,4) != "Lib "
        continue
    ; Read a key from this section.
    IniRead, abstract, %A_ScriptFullPath%, %s%, Abstract
    ; Show it.
    MsgBox 0, % SubStr(s,5), %abstract%
    ; Advance to the next section name.
    p += t_size(StrLen(s)+1)
}

t_size(n=1) { ; For ANSI vs Unicode compatibility.
    return (A_IsUnicode ? 2 : 1)*n
}
StrGet(p) { ; Script functon not required in AutoHotkey_L.
    return DllCall("MulDiv","int",p,"int",1,"int",1,"str")
}
... or you could ini_getAllSectionNames(), which is already included with your script. :p

#8 SoLong&Thx4AllTheFish

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts

Posted 26 February 2010 - 04:21 PM

Suggestions:
- The listview could have checkboxes so a user could select multiple libraries to install or check for updates.
- check if lib isn't already installed and indicate so in gui, perhaps directly in listview or in a separate tab "Installed libs"

Edit:
- Make sure all running examples are closed automatically when you close Library Explorer.ahk

#9 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 26 February 2010 - 07:18 PM

Do someone use the stdlib mechanism from the installed AutoHotkey folder? I dont see a reason for checking that folder, which would make thinks much complicated. I just ignore it now. Its a basic script for demonstration reason (ok... not anymore).

I would like to have a filter system. I know I saw anywhere a working example with two lists. I think I did make a request for that in wish list...

@toralf
I am glad that you like it.
About self updating... I was never successful at making a self updating script. I need asstistance at that point.
And about the link to its own forum post... there is one, its small named to Home. :)

@Lexikos
At the beginning I had to decide if I use sequencial numbers or names as entry header (section). I decided for numbers, because the database should be accessible from any application. May be users decide to write their own script todo something specific with the library.

If I would have names, then the user must know which content it have before access to the content. For my ini library that is no problem. 8) :lol: :wink: The two (database file and script accessing the database) are nearly independant works.

But if you think it is really better, then may be I do it with names. currently I dont see any reason why.

And there is something...

; Retrieve all section names.
DllCall("GetPrivateProfileSectionNames", "str", names
        , "uint", VarSetCapacity(names)//t_size()
        , "str", A_ScriptFullPath)

:shock: :shock: :shock:
I wish I knew that earlier.

@hugov
- I am against multiple selections and installations. Then something like install all would be possible, but why? Why should someone install all libraries? The problem is to me, that the user of the project do not see the library as a individual work in that case.

- About the check of already installed libs, I think about it. Its a good idea to provide such an info "Installed Libraries" as an extra tab. Yes I like it. Thx.

- Closing automatically all example scripts at script exit is in planning. Also may be the button for Run Example would change to Exit Example or something.

#10 Lexikos

Lexikos
  • Administrators
  • 8856 posts

Posted 27 February 2010 - 02:32 AM

Do someone use the stdlib mechanism from the installed AutoHotkey folder?

Yes, but only for scripts which are dependent on specifics of a given exe (standard AHK, AHKL ANSI or Unicode). For instance, CLR, COM and IsObject (standard AHK only: returns false). Unless you had some way to tell the script where the folders are and which build uses them, and then actually utilised this information, there'd be no point checking in my case.

However, I can see some use for an option to use the StdLib folder (i.e. the one along-side AutoHotkey.exe). I only use My Documents (UserLib) out of necessity - if I didn't, I'd have to duplicate a whole lot of scripts for each build. Others might prefer the StdLib folder or use it out of necessity, i.e. because they have multiple users on the PC using the same libs or they run AutoHotkey.exe on multiple PCs via a network share or removable drive.

#11 ruespe

ruespe
  • Members
  • 562 posts

Posted 27 February 2010 - 11:08 AM

This is really a great idea. I'm sure, most of us where missing such a function for keeping their libraries updated.

Unfortunately I have to keep this collection updated for the whole functionality. I would whish a function like the plugin manager of notepad++ <!-- m -->http://www.brotherstone.co.uk/npp/pm/<!-- m -->

This plugin essentially allows you to install, update and remove all the existing plugins, including itself, right from inside Notepad++. It will notify you when a plugin you use has been updated, and allow you to update it, simply by clicking the "update" button. The update can be delayed or ignored.
It has a centrally located list of plugins, which will be kept up to date.

Additional features:

Only plugins that are compatible with your Notepad++ are shown and installed
Install all supplemental files as well as the plugin file itself (e.g. config, doc, extra libraries). Also installs dependency plugins if any.
Validation of DLLs copied, against a central list of valid files. This slightly mitigates the risk of automatically downloading updates.
Proxies are supported, just change the setting

The database resides in the web and contains all links to all plugins. There are three tabs in the plugin-GUI, which all show the plugins with version, description and a comment about stabiltity:
- Available: shows all available plugins
- Updates: shows all installed plugins which have updates on the net
- Installed: shows all installed plugins

It would be great to have such a functionality. Of course it is nessessary, that all plugin-author keep their plugin-updates at the same place.

...und reichst du mir den kleinen Finger, will ich gleich den ganzen Arm

#12 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 27 February 2010 - 11:20 AM

ruespe, that is currently impossible, because not all of the library developers are providing the needed information. I would collect all those and verfiy myself, that point did not need to be automated (of course would be better).

Some authors have links in the post to their scripts. An update to the script can make the post date of the link outdated. Or another one have the source in the post only, so I cannot write an auto-update feature.

This collection should not be seen as the only and best solution. It is a workaround until we get a better one. There is a related discussion about that topic, started by DerRaphael.
[*:1akdb691]stdLib: call for informationI think with this project it is best to stay as a predownloaded and by hand indexed archive. Sure, after some time passed, there will be allways outdated libraries. For now, we cannot do something about. Its the nature of this community. It lacks an organization, ... no one must follow any standard. That is allright to me. Everyone is welcome, otherwise new bees have problems with integration.

#13 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 01 March 2010 - 02:56 AM

Date: 2010-03-01
Libs: 23

From History.txt:

* LIB: Added library Dock.ahk by majkinetor. (GUID=45A4EC6E-2393-11DF-98E1-539655D89593)
* LIB: Added library md5.ahk by SKAN. (GUID=D778ECFA-23F5-11DF-9285-3AAA56D89593)
* LIB: Added library st.ahk by Banane. (GUID=DE306F2C-2469-11DF-A591-656D56D89593)
* LIB: Added library ProcessInfo.ahk by HuBa and wOxxOm. (GUID=11B37928-249E-11DF-9745-E14B56D89593)
* LIB: Added library EmptyMem.ahk by heresy. (GUID=E3E60D1A-24AE-11DF-B2B2-A0BB56D89593)
* LIB: Added library DateParse.ahk by Titan. (GUID=98BC2FAE-24B3-11DF-BF95-525355D89593)
* LIB: Added library FileGetVersionInfo.ahk by SKAN, wOxxOm. (GUID=CB903340-24B7-11DF-8214-5D6D55D89593)
* LIB: Added library USBD.ahk by SKAN. (GUID=187D751A-24BC-11DF-A4AA-E88755D89593)
* LIB: Added library Affinity.ahk by SKAN. (GUID=54BA6EE0-24BF-11DF-AF06-D09B55D89593)

* DOC: Removed unneeded counter.js and pixel.gif from documentation of TF. (Thx hugov)

* GUI: Library Explorer completly rewritten and reorganized code.
* GUI: The compiled version of the Library Explorer is removed.
* GUI: Now all installed libraries are shown. (Thx hugov)
* GUI: Every examples process will be terminated automatically on exit of main script.


Please make suggestions for adding libraries.

#14 fragman

fragman
  • Members
  • 1591 posts

Posted 01 March 2010 - 04:47 PM

This is really a good idea, I can see this becoming useful.

I would like to see a library for automating Explorer/File Dialogs/(context menus, I have a few functions, but they don't work in all cases. There is something like that from majkinetor, but it is outdated and doesn't properly support Vista/7. He said he was working (or wanted to) on getting it updated, but I don't know the current status of that.

#15 Tuncay

Tuncay
  • Members
  • 1943 posts

Posted 01 March 2010 - 11:32 PM

@fragman
From which library do you speak?


Added following to the first post:
Call for all library and function developers

If you are a developer of any function, then have it in mind others could use it with the stdlib mechanism. Every function should reside in a library (that is a file containing functions only). A library is stdlib compatible, if the main usable functions lead to automatically inclusion of the library.

Names: To avoid possible conflict, please see what others have done and which function names and prefixes they uses. Different libraries cannot share same set of names.
Script: Please do provide the needed information in a standardized way if it is possible. Most important infos which I cannot guess often are the date of last edit and the version. At least, one of them should be available.
Official example scripts would be good to have, but it is not required. If there is no one, I`ll create one.
What you should do allways is, making an external documentation. It does not need to cover every aspect, begin to write down the most important informations first.
License: And I beg you, please make a notice about what license your script uses. That is an often neglected part, which can cause serious problems. I recommend the GNU Lesser General Public License.
I found that related page: How to choose a free software license.