Opened 15 years ago
Closed 15 years ago
#1893 closed Feature Request (Rejected)
#Include-All
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | install all | Cc: |
Description
I would like to see a new pre-compiler directive, #Include-All.
Syntax would be similar to the #Include directive, but would allow for wildcards in the filename. In the absence of a path, the main script path would be assumed.
Example:
#Include-All <*.inc.au3>
would include all files with ".inc.au3" as the extension within the same path/folder as the main script being compiled/run.
Reason:
I write scripts that often have additional functionality added as time goes on, such as machine data or installed software information gathering. New software or component detection often requires a new function to handle it. Rather than modifying the code in multiple places to accommodate the function, The main script could be driven by an array of functions. Each new addition would need only be a new include file that adds itself to the appropriate controlling arrays.
This method would also apply well for spyware/malware removal scripts that I have written.
Adding new functionality would then require only sending the new include to the client, and having them drop it into the script folder and re-compiling.
Attachments (0)
Change History (5)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
I like the idea but not in the way the OP described.
It could be just #Include-All without any wildcards and it could add ALL STANDARD UDFs.
comment:3 by , 15 years ago
I don't think including really every include file would make sense.
Also this would be possible by wildcasting them as "*.au3" which adds more flexibility.
I'd make the "#include" able to interpret wildcasts, I don't see anything bad here.
comment:4 by , 15 years ago
#Include-All and then on compile do a /striponly automatically, so that only relevant UDF's are kept.
I think would work the best.
comment:5 by , 15 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
We will not add bad features to facilitate lazy programming. Write your code well and a dangerous feature like this will not be necessary.

Don't seems something that really adds something generally useful to AutoIt's core, or something that can't be done with some (run-before-compile) user script.
or,