AutoHotkey Community

It is currently May 24th, 2012, 9:32 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: April 1st, 2007, 5:01 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1933
Location: Germany
Would make an AutoInclude library (stdlib.ini) any sense? This could avoid the need of include often used and standardized libraries. And a new option "/lib file" at command line stage too.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2007, 8:20 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
A standard library is already planned, but how do you figure a '/lib file' option would be more convenient than #Include directives?

And frankly, I don't think an "auto-include" would make sense. Could you explain more about what you think it could be used for?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 2nd, 2007, 10:09 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1933
Location: Germany
I know about the standard library.

The user would not have to know in which file the function or subroutine reside.

Not to forget an new directive "#NoAutoInclude".

Note this is not a wish, just opened the thread for discussion.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 3rd, 2007, 1:32 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
I still don't see what makes this a good thing. If they're going to be automatically included anyway, how is that different from them being built into the language? I think include files are better for functions that are less often used.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 3rd, 2007, 6:42 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2537
jonny wrote:
I still don't see what makes this a good thing. If they're going to be automatically included anyway, how is that different from them being built into the language? I think include files are better for functions that are less often used.
I think that's the whole point. If functions could be automatically included when needed then user functions that haven't been built-in to AutoHotkey.exe can seem as if they are built-in. An entire library of functions doesn't necessarily need to be included. Specific functions that are referenced could be included only depending on how the lib and/or method of including functions is designed.

I'm not sure about the method suggested as it would require AutoHotkey to do most of the processing but I like the concept of automatically including functions from a lib file if they have been referenced and don't currently exist as functions within the code.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 3rd, 2007, 8:36 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1933
Location: Germany
jonny wrote:
If they're going to be automatically included anyway, how is that different from them being built into the language?
Thats the difference.

But then every code in the stdlib.ahk would be included to all scripts and blow them up, even if not needed.

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 4th, 2007, 7:06 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
The idea of a command line switch to include a library is original and interesting, but not very practical. You say "Not to forget an new directive "#NoAutoInclude"", but then, if the switch is forgotten (which will be the case in runs by double click, drag'n'drop, context menu, etc.), the script won't work.
Plus either the library will be too small to be really useful, or too big to be practical to be included even on demand. A standard library should be modularized, with sections like DllCall-related functions, mathematical functions, string functions, and so on.
Anyway, there is at least another topic on this subject, so there is little point to discuss such details here.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 8 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