Jump to content



Photo

Organize includes in Scite


  • Please log in to reply
50 replies to this topic

#1 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 11 May 2007 - 09:22 PM

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, 26 October 2007 - 08:07 AM.

Scripts & functions Organize Includes Let Scite organize the include files *newYahtzee 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





#2 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,315 posts

Posted 11 May 2007 - 09:53 PM

Definitely great idea and also implementation :) :D

#3 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 11 May 2007 - 10:27 PM

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 *newYahtzee 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

#4 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 12 May 2007 - 10:00 AM

HI,

increased speed and and added filename.

See 1st post.

So long,

Mega
Scripts & functions Organize Includes Let Scite organize the include files *newYahtzee 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

#5 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 12 May 2007 - 10:20 AM

Wow this rocks :) Keep it up meger!

Edited by Secure_ICT, 12 May 2007 - 10:21 AM.


#6 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 12 May 2007 - 01:25 PM

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 *newYahtzee 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

#7 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 14 May 2007 - 10:46 AM

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

#8 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 14 May 2007 - 07:24 PM

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 *newYahtzee 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

#9 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 14 May 2007 - 07:44 PM

I have used it and its cool. So much easier.

#10 mrbond007

mrbond007

    License To Script

  • Active Members
  • PipPipPipPipPipPip
  • 422 posts

Posted 14 May 2007 - 07:45 PM

yeah , excellent

#11 Zoldex

Zoldex

    Seeker

  • Active Members
  • 30 posts

Posted 19 May 2007 - 10:20 PM

Great job! Keep it up!

#12 Gif

Gif

    Laikon Kafekoption

  • Active Members
  • PipPipPipPipPipPip
  • 1,117 posts

Posted 20 May 2007 - 08:47 PM

Unexpected script!! orginaze includes lol, nice one

#13 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 22 May 2007 - 10:02 PM

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 *newYahtzee 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

#14 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 05 June 2007 - 07:26 AM

Hi,

new version (1.3) see 1st post.

Thanks for every comment! :)

So long,

Mega

Edited by th.meger, 05 June 2007 - 07:26 AM.

Scripts & functions Organize Includes Let Scite organize the include files *newYahtzee 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

#15 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 08 June 2007 - 04:26 PM

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 *newYahtzee 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

#16 ReaImDown

ReaImDown

    Slacker

  • Active Members
  • PipPipPipPipPipPip
  • 552 posts

Posted 08 June 2007 - 11:44 PM

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? :)
~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs

#17 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 09 June 2007 - 07:39 AM

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 *newYahtzee 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

#18 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 09 June 2007 - 05:48 PM

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.

#19 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 10 June 2007 - 11:20 AM

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.

#20 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,727 posts

Posted 10 June 2007 - 09:11 PM

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 *newYahtzee 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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users