Jump to content

Organize Includes in Scite for Autoit


Xenobiologist
 Share

Recommended Posts

Now switching to your log_view project. I changed your include script to this:

You are right.

On WINXP it works fine.

But on WIN98 there was missing:

<ListViewConstants.au3>

<WindowsConstants.au3>

I made also some another changes due to 3.2.11/3.2.10 incompatibility

so it maybe affected functionality your utility at first try maded on WIN98.

So don't big problem.

For scripts migration process from 3.2.10 to 3.2.11 it's BIG HELP!!

Thanks.

Link to comment
Share on other sites

  • Replies 116
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

so there is nothing to do for me, right? I couldn't get it from your lines. :)

Any other suggestions?

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

Link to comment
Share on other sites

so there is nothing to do for me, right? I couldn't get it from your lines. :)

Yes.

Any other suggestions?

Little cosmetics:

1) I use #include <GuiListView.au3> 

and your script uses #include<GuiListView.au3>

without space and it's irritating for me :-)

So this could be optional (in INI)

2) I prefer to add new include files given by your utility by hand (from clipboard) so some button to copy to clipboard would be good.

I know there is checkbox for copy to clipboard but it has default value OFF and when I want to copy result to clipboard

I must switch checkbox to ON and make rescan once again.

Or maybe button "Organise includes" should do copy to clipboard if checkbox is ON

3) Before writing into Scite OutPut window clear it first

there may be outpit from previous compiling

4) Maybe some button for open (and scan) new AU3 file (also open load it into Scite)

for case when I run it by hand and not from Scite Tools menu

Link to comment
Share on other sites

Nevertheless one bug in logic:

In my Log_View project I use

#Include "log_view_include.au3"

...
    $val1 = GetSubItemText($ListView1, $nItem1, $nColumn)
    $val2 = GetSubItemText($ListView1, $nItem2, $nColumn)
...

and in log_view_include.au3

Func GetSubItemText($nCtrlID, $nItemID, $nColumn)
 ...
EndFunc

But your utility says: log_view_include.au3 --> not needed

Link to comment
Share on other sites

Thanks, but IMO it is no bug in logic.

That is a problem from Autoit which leads to a problem for you. :)

I'm only looking for the function name, not what kind of, or how many parameters are defined.

It isn't advisable to define two functions with the same name!

In Autoit it isn't possible to call a function like this : includefile.functioname. So, you will even get an error if you include two include files which contain the same function.

So, IMO you have just one address-space for your function names in which every function name should be unique.

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

Link to comment
Share on other sites

Thanks, but IMO it is no bug in logic.

That is a problem from Autoit which leads to a problem for you. :)

I'm only looking for the function name, not what kind of, or how many parameters are defined.

It isn't advisable to define two functions with the same name!

In Autoit it isn't possible to call a function like this : includefile.functioname. So, you will even get an error if you include two include files which contain the same function.

So, IMO you have just one address-space for your function names in which every function name should be unique.

Mega

Sorry for messing up your thread but you are not right.

My script is correct: I have only one declaration of function GetSubItemText() in log_view_include.au3

In main script log_view.au3 where is #Include "log_view_include.au3"

is called GetSubItemText() twice.

I think there is maybe bug in logic about including files from script directory:

#Include "log_view_include.au3"

instead of standard includes like

#Include <Array.au3>

That's all.

Link to comment
Share on other sites

Sorry for messing up your thread but you are not right.

My script is correct: I have only one declaration of function GetSubItemText() in log_view_include.au3

In main script log_view.au3 where is #Include "log_view_include.au3"

is called GetSubItemText() twice.

I think there is maybe bug in logic about including files from script directory:

#Include "log_view_include.au3"

instead of standard includes like

#Include <Array.au3>

That's all.

HI,

no problem. I guess I understand what you mean, but it works for me.

I put the path into the OI script :

; **************************************************************
;   Add HERE your own pathes for udfs
; **************************************************************
     _ArrayAdd($includesPathes_A, $InstallPath & '\include\UDF\')
     _ArrayAdd($includesPathes_A, 'C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\OI_Test\')

and then I put this as new script

$val1 = GetSubItemText($ListView1, $nItem1, $nColumn)
$val2 = GetSubItemText($ListView1, $nItem2, $nColumn)

and OI said this:

+> "Organize Includes" for AutoIt3 | Version 3.7 | © Th.Meger | 10.Feb.2008
!> Creating includes.ini ...
!> ----------------------------------------------------------------------------------------------------
+> GetSubItemText                                   > log_view_include.au3
!> ----------------------------------------------------------------------------------------------------
>Exit code: 0   Time: 25.919

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

Link to comment
Share on other sites

I put the path into the OI script :

; **************************************************************
;    Add HERE your own pathes for udfs
; **************************************************************
     _ArrayAdd($includesPathes_A, $InstallPath & '\include\UDF\')
     _ArrayAdd($includesPathes_A, 'C:\Downloads\AutoIt-Skripte\Entwicklung\ForumTests\OI_Test\')
AHA!

That's the problem.

I thought that it will find log_view_include.au3

from this syntax #Include "log_view_include.au3" itself in script directory.

I just opened main script and ran OI without modifying include paths because my include file is in main script directory.

Link to comment
Share on other sites

AHA!

That's the problem.

I thought that it will find log_view_include.au3

from this syntax #Include "log_view_include.au3" itself in script directory.

I just opened main script and ran OI without modifying include paths because my include file is in main script directory.

Hi,

yes! :) In version 3.7 I implemented a better check whether you added an include path or a new file.au3 was added\deleted in the pathes. OI checks for that and if something has changed, it automatically creates a new includes.ini. If you change a files source (adding a new func) you still need to manually let OI create a new includes.ini file, cause I do not compare filesize.

I thought it is useful to define the pathes tocheck for udfs in OI, cause sometimes I start script from my forumfolder and then OI would have to check for ~ 2500 au3 files. :) That would cause OI to run very very 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

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

@Zedna : Thanks again for your suggestions.

1) I use #include <GuiListView.au3>

and your script uses #include<GuiListView.au3>

without space and it's irritating for me :-)

So this could be optional (in INI)

Yes, I added this to the next version.

2) I prefer to add new include files given by your utility by hand (from clipboard) so some button to copy to clipboard would be good.

I know there is checkbox for copy to clipboard but it has default value OFF and when I want to copy result to clipboard

I must switch checkbox to ON and make rescan once again.

Or maybe button "Organise includes" should do copy to clipboard if checkbox is ON

Yes, is already there. You just need to set this:

Place after keyword (Yes) chose a keyword which will not be in your code like ZEDNA_MVP

Check Copy to clipboard and then

hit button organize includes.

Now, all the needed includes are stored into you clip.

The settings copy to clipboard will be saved and set to default if you exit OI with Exit button.

3) Before writing into Scite OutPut window clear it first

there may be outpit from previous compiling

Yes, added this :

; clear Output

SendSciTE_Command($My_Dec_Hwnd, $Scite_hwnd, 'menucommand:420')

4) Maybe some button for open (and scan) new AU3 file (also open load it into Scite)

for case when I run it by hand and not from Scite Tools menu

Sorry, do not get what you mean here.

---

Will post the new version at the weekend.

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

Link to comment
Share on other sites

  • 2 weeks later...

Great!

Thanks

Uploaded a new version. (needs beta)

Thanks!

Mega

Explanation: To define looking of includes add this to includes.ini into Options section:

can be what you want!

IncludesFormatStart=#include<

IncludesFormatEnd=> ; OI set INCLUDE

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

Link to comment
Share on other sites

Thanks for update.

But I think there should be new (radio item) option for switching between release/beta includes.

release 3.2.10 and beta 3.2.11.x have changed/different include files

so if I wan't compile script with latest beta it's OK as it is now

but if I want to compile the same script with "old" release 3.2.10 then I'm in trouble

because it finds beta include files first.

But this problem still remains.

If I run OI on OrganizeIncludes3.9.au3 then it tells me that these are not needed:

#include<ListViewConstants.au3>

#include<WindowsConstants.au3>

#include<String.au3>

But it's not true because you scan release include files first and then beta include files.

So you find/resolve release include files first no matter of beta.

As I said before there should be radioitem for release/beta include files to to use.

Link to comment
Share on other sites

Hi,

updated 1st post.

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

Link to comment
Share on other sites

Thanks, I'll check that.

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

Link to comment
Share on other sites

  • 2 weeks later...

Hi you can`t find the au3-file for these two files, because they don`t exist.

See the example in the help file for "_GUIScrollBars_Init".

You must write the functions direct into your Script :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...