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 

Would make an AutoInclude library (stdlib.ini) any sense?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Tuncay



Joined: 07 Nov 2006
Posts: 384
Location: Berlin

PostPosted: Sun Apr 01, 2007 5:01 pm    Post subject: Would make an AutoInclude library (stdlib.ini) any sense? Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sun Apr 01, 2007 8:20 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Tuncay



Joined: 07 Nov 2006
Posts: 384
Location: Berlin

PostPosted: Mon Apr 02, 2007 10:09 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Tue Apr 03, 2007 1:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
corrupt



Joined: 29 Dec 2004
Posts: 2397

PostPosted: Tue Apr 03, 2007 6:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Tuncay



Joined: 07 Nov 2006
Posts: 384
Location: Berlin

PostPosted: Tue Apr 03, 2007 8:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed Apr 04, 2007 7:06 am    Post subject: Reply with quote

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.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Page 1 of 1

 
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