AutoIt Forums: Organize Includes in Scite for Autoit - AutoIt Forums

Jump to content

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Organize Includes in Scite for Autoit CTRL+SHIFT+ALT+I will do the trick Rate Topic: ***** 3 Votes

#1 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Post icon  Posted 17 October 2007 - 09:11 PM

Hi,

http://h1.ripway.com/bananafred/people%27s%20choice%202007/cat_misc.jpg

this script scans all the funcs in Autoits include files and you can easily add pathes to your udfs.
Starting the script by hitting CTRL+SHIFT+ALT+I in Scite, it shows you what include files you need and which you do not need.

Link --> old Thread : http://www.autoitscript.com/forum/index.php?showtopic=45814

It is a bit tricky to install it manually (see old thread) because of that I created a quick installer to do the configuration for you. (Installer is in the zip file)

You need Autoit v3.2.12.1 and of course SciTE for Autoit.


Thanks! (martin & Tweaky & Zedna and all the others!!!)

Added : Include pathes to your own udfs now have to be defined in the includes.ini and no in code anymore.
[UDF_Include_Pathes]
MyUDFPath1=
MyUDFPath2=
MyUDFPath3=
MyUDFPath4=

Added : OI now detects selfinclude
Changed: Release and beta includes are now readiobuttons
Changed : OI now works with Release version 3.2.12.1 and higher
Added : new Regex to differ e.g $nr_Max and _Max()
Added : ;~ comments detection

and a lot of little things inside.

NEW THREAD AND VERSION!!! NEW VERSION

So long,

Mega

Attached File(s)

  • Attached File  4.3.zip (11.17K)
    Number of downloads: 3212

This post has been edited by Xenobiologist: 19 March 2010 - 03:12 PM


#2 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 19 October 2007 - 03:29 PM

Hi,

what do I have to do to make this script more useable for beginners or experts?

I'd like to do a rewrite if somebody shows up a possibilty how to get this in handy.

Thanks!

So long,

Mega

#3 User is offline   martin 

  • ~~\o/~~~/0\=¬''~~~
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 6,445
  • Joined: 24-October 04
  • Location:uk

Posted 20 October 2007 - 07:59 PM

View PostXenobiologist, on Oct 19 2007, 03:29 PM, said:

Hi,

what do I have to do to make this script more useable for beginners or experts?

I'd like to do a rewrite if somebody shows up a possibilty how to get this in handy.

Thanks!

So long,

Mega


Looks good so far but a couple of times it says I need guibuttons.au3 but it's wrong.

An example is this script.. (You need to comment out lots of Consts )

I also tried it on RazerM's editor which I'm using. Organize includes said that it didn't need array.au3. I commented it out and it ran fine. :)

With 'food guide.au3' (3700 lines long) it says guicombobox.au3 needed, but that's not true as far as I can tell, and it also says #include <XSkin.au3> is needed but this is already in the script as #include ".\FoodGuide\XSkin.au3".


Present suggestions.
a progresson or something because there is a delay when you start your script running before you see anything.

It would be helpful if when you say that a certain include file is needed you could show where or why it's needed. With the false button one for example, it would help show why it tells you. Also, if it's correct it's good to be show exactly why, and this gives more confidence.

Glad you've kept working on this. I think a lot of people will have scripts with includes which aren't needed, or they won'tl know what they should include when they paste code in from somewhere and it doesn't work.

#4 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 28 October 2007 - 09:55 PM

Hi,

thanks for the nice reply.
I tested you stuff.
1) guibuttons.au3 is needed - I couldn't reproduce it.
2) #include ".\FoodGuide\XSkin.au3" - I have to improve checking for includes with a path and includes in includes
3) suggenstions :
a ) Progress - ok should be possible
b ) Show why is needed - can maybe be done by adding a new column. (takes me some time)

So long,

Mega

This post has been edited by Xenobiologist: 28 October 2007 - 09:56 PM


#5 User is offline   martin 

  • ~~\o/~~~/0\=¬''~~~
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 6,445
  • Joined: 24-October 04
  • Location:uk

Posted 29 December 2007 - 01:32 PM

I modified Organize Includes for the latest include files.
It produces the result shown below.


I don't know what the yellow lines with a '1' for the include file mean.

The last line is a small bug I think because dllcallback is not included in my script, but I have two lines in my script like this
[ code='text' ]    ( Popup )
$AutoMonItText = StringReplace($AutoMonItText,"#include <dllcallback.au3>","#include " & "'" & $AutoItBetaexePath & "\Include\dllcallback.au3'") $AutoMonItText = StringReplace($AutoMonItText,"#include '#x#x#x#xx#BBAutoMonIt script goes here#x#x#x#x#x#'",$temptext)

so I think your script is finding the include even though it is enclosed in quotes.

Your script seems to ignore include files like this

#include "scrollbars.au3" ;I have 2 includes like this

or is that connected with the yellow lines?

#6 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 31 December 2007 - 02:56 AM


This post has been edited by Xenobiologist: 31 December 2007 - 04:08 AM


#7 User is offline   icadea 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 157
  • Joined: 24-August 07
  • Location:asia

Posted 31 December 2007 - 05:33 AM

wow. this is great. hope this will be added in the next scite version as default

#8 User is offline   martin 

  • ~~\o/~~~/0\=¬''~~~
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 6,445
  • Joined: 24-October 04
  • Location:uk

Posted 31 December 2007 - 02:10 PM

Thanks Mega, some good improvements.

But there is still a problem with the script I sent you (AutoMonitDB.au3). OI says that I don't need GuiScrollbars.au3 but I do.

#9 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 31 December 2007 - 03:29 PM

View Postmartin, on Dec 31 2007, 02:10 PM, said:

Thanks Mega, some good improvements.

But there is still a problem with the script I sent you (AutoMonitDB.au3). OI says that I don't need GuiScrollbars.au3 but I do.


Hi,

it works for me. Do you have GuiScrollbars.au3 in the folder to check for? Is the GuiScrollbars.au3 listed in the include.ini?
GUIScrollbars.au3=_GUIScrollBars_Init;MY_WM_SIZE;MY_WM_HSCROLL;MY_WM_VSCROLL;_GUIScrollBars_Enable;_


GUIScrollBars_Show;_GUIScrollBars_SetPos;_GUIScrollBars_SetRange;_GUIScrollBars_GetRange;_DebugPrint


Besides, there are functionnames in the GuiScrollbars.au3 that might be double in other udfs like MY_WM_SIZE. This might cause some trouble later on.

@icadea: Thanks, but I guess this is never going to happen. :rolleyes:

So long,

Mega

This post has been edited by Xenobiologist: 31 December 2007 - 03:30 PM


#10 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 31 December 2007 - 03:44 PM

Why is it telling my I need ProSpeed.au3 when my program has no reason for it what so ever :huh2:

#11 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 31 December 2007 - 03:54 PM

View PostJamesB, on Dec 31 2007, 03:44 PM, said:

Why is it telling my I need ProSpeed.au3 when my program has no reason for it what so ever :huh2:


Hi,

which version of Organize Includes did you try? Try the latest and it will output in Scite why the includes are needed.

Like this:

_GUICtrlComboBox_FindString from GuiComboBox.au3 found
_GUICtrlListView_DeleteAllItems from GuiListView.au3 found
_IsPressed from Misc.au3 found
GUICreate from GUIConstants.au3 found
_GUIScrollBars_Init from GUIScrollbars.au3 found
_MemoryOpen from NomadMemory.au3 found

So long,

Mega

#12 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 31 December 2007 - 04:17 PM

Ahh good idea. Thanks TheMG! (You will always be that to me)

#13 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 31 December 2007 - 04:21 PM

Quote

_ArrayDisplay from Array.au3 found
_FileCreate from File.au3 found
_GUICtrlEdit_AppendText from GuiEdit.au3 found
_GUICtrlListView_Create from GuiListView.au3 found
_GUICtrlStatusBar_Create from GuiStatusBar.au3 found
Grey from Prospeed.au3 found
GUICreate from GUIConstants.au3 found

Grey? I don't even use it in a function, its in a comment.

#14 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 31 December 2007 - 04:27 PM

Hi,

can you pm me your testscript with the needed includes please. So I can have a look at it.

Thanks!

So long,

Mega

#15 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 31 December 2007 - 04:29 PM

The word grey is in a comment. Lemme see if I can re-create it.

Put this into a new document:
[ autoIt ]    ( Popup )
; Grey word is in a comment

Then run the Organise Includes program and it will tell you, you need Prospeed.au3

This post has been edited by JamesB: 31 December 2007 - 04:30 PM


#16 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 31 December 2007 - 05:04 PM

Hi,

ah okay. Thanks for feedback!!!

I fixed the pattern.

So long,

Mega

This post has been edited by Xenobiologist: 27 January 2008 - 03:03 PM


#17 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 31 December 2007 - 05:13 PM

Much better! Works well! Awesome work yet again! Thanks!

#18 User is offline   martin 

  • ~~\o/~~~/0\=¬''~~~
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 6,445
  • Joined: 24-October 04
  • Location:uk

Posted 31 December 2007 - 06:07 PM

View PostXenobiologist, on Dec 31 2007, 02:29 PM, said:

Hi,

it works for me. Do you have GuiScrollbars.au3 in the folder to check for? Is the GuiScrollbars.au3 listed in the include.ini?
GUIScrollbars.au3=_GUIScrollBars_Init;MY_WM_SIZE;MY_WM_HSCROLL;MY_WM_VSCROLL;_GUIScrollBars_Enable;_




GUIScrollBars_Show;_GUIScrollBars_SetPos;_GUIScrollBars_SetRange;_GUIScrollBars_GetRange;_DebugPrint



I have GuiScrollbars in the foder with my script, but I also have a copy in my Includes folder.

In the ini file I get this
GUIScrollbars.au3=_InitScrollDimensions;MY_WM_CREATE;MY_WM_SIZE;MY_WM_VSCROLL;MY_WM_HSCROLL;_EnableS


crollBar;_ShowScrollBar;_SetScrollPos;_SetScrollRange;_GetScrollRange;_DebugPrint

I don't think there can be other places where there is MY_WM_SIZE or I would get errors when I ran the script.
If I rename MY_WM_SIZE to XMY_WM_SIZE in my script and in the GuiScrollBar.au3 file I still get told the file isn't needed.

ANy ideas?

This post has been edited by martin: 31 December 2007 - 06:08 PM


#19 User is offline   Xenobiologist 

  • Xx Code~Mega xX
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 4,209
  • Joined: 28-July 05
  • Gender:Male
  • Location:Germany, Münster

Posted 01 January 2008 - 05:14 PM

View Postmartin, on Dec 31 2007, 06:07 PM, said:

I have GuiScrollbars in the foder with my script, but I also have a copy in my Includes folder.

In the ini file I get this
GUIScrollbars.au3=_InitScrollDimensions;MY_WM_CREATE;MY_WM_SIZE;MY_WM_VSCROLL;MY_WM_HSCROLL;_EnableS



crollBar;_ShowScrollBar;_SetScrollPos;_SetScrollRange;_GetScrollRange;_DebugPrint

I don't think there can be other places where there is MY_WM_SIZE or I would get errors when I ran the script.
If I rename MY_WM_SIZE to XMY_WM_SIZE in my script and in the GuiScrollBar.au3 file I still get told the file isn't needed.

ANy ideas?


HI,

yes I got an idea and I think it is also the solution. :P

Your two GuiScrollBar.au3 files are different. Look at the found funcs.

Wrong (I think old version)
GUIScrollbars.au3=_InitScrollDimensions;MY_WM_CREATE;MY_WM_SIZE;MY_WM_VSCROLL;MY_WM_HSCROLL;_EnableS

crollBar;_ShowScrollBar;_SetScrollPos;_SetScrollRange;_GetScrollRange;_DebugPrint
Right version (The file you gave me)
GUIScrollbars.au3=_GUIScrollBars_Init;MY_WM_SIZE;MY_WM_HSCROLL;MY_WM_VSCROLL;_GUIScrollBars_Enable;_

GUIScrollBars_Show;_GUIScrollBars_SetPos;_GUIScrollBars_SetRange;_GUIScrollBars_GetRange;_DebugPrint



You are using _GUIScrollBars_Init which is only in one of your GuiScrollBar.au3 files.

The other point MY_WM_SIZE to XMY_WM_SIZE

You do not need to rename the func. What I meant was that e.g. Gary adds to his udfs often the func _DebugPrint. When there are many different udfs in your include folder which OI investigates and all of them contain the func _DebugPrint then this is listed in includes.ini. If you now use the func _DebugPrint then OI would think you need all the includes files which contain this function. Clear??? :huh:

So long,

Mega

#20 User is offline   martin 

  • ~~\o/~~~/0\=¬''~~~
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 6,445
  • Joined: 24-October 04
  • Location:uk

Posted 01 January 2008 - 05:40 PM

View PostXenobiologist, on Jan 1 2008, 04:14 PM, said:

HI,

yes I got an idea and I think it is also the solution. :P

Your two GuiScrollBar.au3 files are different. Look at the found funcs.

Wrong (I think old version)
GUIScrollbars.au3=_InitScrollDimensions;MY_WM_CREATE;MY_WM_SIZE;MY_WM_VSCROLL;MY_WM_HSCROLL;_EnableS


crollBar;_ShowScrollBar;_SetScrollPos;_SetScrollRange;_GetScrollRange;_DebugPrint
Right version (The file you gave me)
GUIScrollbars.au3=_GUIScrollBars_Init;MY_WM_SIZE;MY_WM_HSCROLL;MY_WM_VSCROLL;_GUIScrollBars_Enable;_


GUIScrollBars_Show;_GUIScrollBars_SetPos;_GUIScrollBars_SetRange;_GUIScrollBars_GetRange;_DebugPrint




You are using _GUIScrollBars_Init which is only in one of your GuiScrollBar.au3 files.

The other point MY_WM_SIZE to XMY_WM_SIZE

You do not need to rename the func. What I meant was that e.g. Gary adds to his udfs often the func _DebugPrint. When there are many different udfs in your include folder which OI investigates and all of them contain the func _DebugPrint then this is listed in includes.ini. If you now use the func _DebugPrint then OI would think you need all the includes files which contain this function. Clear??? :huh:

So long,

Mega


I don't think you are quite right.
The GuiScrollbars I sent you is the one I use and it is in my script directory. In my script I have
#include "GUIScrollBars.au3"
so I expect that the one in my script directory will be used, but it looks like OI is looking at the one in my includes folder.
Actaully it is the one used or my script wouldn't work. OI looks at the include file (the wrong one in this case) and says none of the functions in this include file are used in the script so the include file is not needed.

I understand what you are saying about MY_WM_SIZE. I only renamed it as a temporary test to see if it made any difference to the OI result, because that way there would only be one file where the function would be found, i.e. in the guiscrollbars.au3 in the script dir. But OI still said it wasn't needed even though there was a function referred to which only occurs in that file.
Is it because OI misses references to functions in GuiRegisterMsg? There are 2 of these in my script-
GUIRegisterMsg($WM_VSCROLL, "MY_WM_VSCROLL");< is OI missing these functions??
GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL")

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users