Jump to content
Sign in to follow this  
Xenobiologist

Organize includes in Scite

Recommended Posts

Xenobiologist

Hi,

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 :

Posted Image

Posted Image

So long,

Mega

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

Definitely great idea and also implementation :):D

Thanks!

I'll try to improve if some people like it or have ideas to implement.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

HI,

increased speed and and added filename.

See 1st post.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

Wow this rocks :) Keep it up meger!

Hi,

thanks!

Added functionality to search automatically for new funcs included in a higher beta.

So, it updates itself. :D

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

Heh thats a good way to make it so you dont need to keep posting. Once again. This rocks!

Hi,

right. Maybe some day JdeB will implement his own func in his great scite tool. :-)

Or maybe includes become unnecessary because there is a clean script or precompiler that includes all funcs and then deletes the unneeded ones.

So long,

Mega

P.S.: Hoping somebody uses this little script, too. :)


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Zoldex

Great job! Keep it up!

Share this post


Link to post
Share on other sites
Gif

Unexpected script!! orginaze includes lol, nice one

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

new version (1.2) see 1st post.

Thanks for every comment! :)

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

new version (1.3) see 1st post.

Thanks for every comment! :)

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

76 downloads of the new version and no comment - seems to work correctly. :)

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
ReaImDown

Hi,

76 downloads of the new version and no comment - seems to work correctly. :)

So long,

Mega

maybe make it so if its already included, not to re-include it again? :)


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
Xenobiologist

maybe make it so if its already included, not to re-include it again? :)

Hi,

should be already implemented in the 1.3 version. All includes are listed, but only the necessary ones are selected.

If this doesn't work for you, then show me some code to check it. Thanks!

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
RazerM

First look at this and I'll definetely use this. Good work!


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites
RazerM

After using this a few times, I have suggestions:-

  • Allow includes to be placed at a certain point in the script (e.g. after a comment such as ;[includes])
  • Give option to remove no longer needed includes

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites
Xenobiologist

After using this a few times, I have suggestions:-

  • Allow includes to be placed at a certain point in the script (e.g. after a comment such as ;[includes])
  • Give option to remove no longer needed includes
Hi,

thanks! I'll have a look whether I can implement your suggestions.

Thank you!

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×