EDIT : There is a new version here : New Version of OrganizeIncludes
Manage the includes automatically
in Java IDEs it is common that there is a shortcut which organizes the imports/includes.
I often got the situation that I copy peaces of code from the forum where somebody forgot to add the includes.
This is my try to do this automatically via a shortcut in Scite.
What to get it started?
1. save the script here : ... \SciTE\OrganizeIncludes\OrganizeIncludes2.5.au3
2. put this into SciteUser.properties : to find under @UserProfileDir [if the file isn't there start Scite config by hitting CTRL+1]
or download from : http://www.autoitscript.com/autoit3/files/...User.properties
3. open a script.au3 file and press CTRL+ALT+SHIFT+I
# 36 OrganizeIncludes command.36.*.au3="$(autoit3dir)\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OrganizeIncludes2.5.au3" "$(FilePath)" command.name.36.*.au3=OrganizeIncludes command.save.before.36.*.au3=1 command.is.filter.36.*.au3=1 command.shortcut.36.*.au3=Ctrl+Shift+Alt+I
20070522 - deleted version 1.0
20070522 - added autoupdate
20070522 - added GUI
20070522 - added always search in normal and beta version
20070523 - fixed using script without beta installed
20070605 - added searching also in udf includes (saved in include folder)
20070605 - fixed include files with only one func (bug in _ArrayToString)
20070605 - added all includes are listed only the necessary includes are selected
20070705 Added : Silent Mode : After configuration, the script can be run without GUI. Completely automatically!
20070705 Added : Remove unneeded includes
20070705 Added : Option to place the includes after a special keyword (idea RazerM)
20070705 Added : New column for includes status
20070705 Added : Settings are saved in ini file
20070705 Added : Lots of little things
20070705 Changed : Includes are only added when needed in every option
20070705 Fixed : Deleting unneeded includes when no include is necessary did not work (Thanks Tweaky)
20070706 Fixed : Index (array) problem when many includes have to be deleted
20070706 Fixed : No files found message when only beta or normal is installed
20070706 Added : Version number of script
20070709 Added : AutoRestart option
20070709 Added : Avoid selfinclude
20070709 Added : Constants.au3 (For the Run commands without GUI)
20070709 Added : Button to add udf folder for own include files
20070709 Fixed : Trimmed the RegExp-search down to word bounds [because of SetBkColor and GuiCtrlSetBkColor]
20070709 Added : Ignoring of commented lines. They will be analysed and the result is shown (whether the are needed or not) but they will not be affected from deleting options anymore.
ToDo : Check include files for already included other include files [eg. ftpplus.au3 includes already date.au3]
Thanks for reading!
EDIT : There is a new version here : New Version of OrganizeIncludes
Screenshots :
So long,
Mega
Edited by Xenobiologist, 26 October 2007 - 08:07 AM.





