Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Organize Includes in Scite for Autoit


  • Please log in to reply
116 replies to this topic

#41 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 26 March 2008 - 04:10 PM

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.







#42 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 26 March 2008 - 05:00 PM

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, 26 March 2008 - 05:01 PM.

Scripts & functions Organize Includes Let Scite organize the include files *new

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


#43 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 26 March 2008 - 05:28 PM

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

#44 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 26 March 2008 - 05:33 PM

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

#45 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 26 March 2008 - 08:42 PM

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

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


#46 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 26 March 2008 - 09:35 PM

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.

#47 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 26 March 2008 - 09:52 PM

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

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


#48 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 26 March 2008 - 10:39 PM

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.

#49 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 27 March 2008 - 08:37 AM

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

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


#50 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 16 April 2008 - 12:42 PM

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, 16 April 2008 - 03:19 PM.

Scripts & functions Organize Includes Let Scite organize the include files *new

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


#51 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 16 April 2008 - 03:05 PM

Hi,

@Zedna : Thanks again for you suggestions.

---

Will post the new version at the weekend.

Mega



Great!
Thanks

#52 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 29 April 2008 - 05:20 PM

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, 29 April 2008 - 05:31 PM.

Scripts & functions Organize Includes Let Scite organize the include files *new

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


#53 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 29 April 2008 - 10:59 PM

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.

#54 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 02 May 2008 - 10:15 PM

Hi,

updated 1st post.

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

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


#55 SandelPerieanu

SandelPerieanu

    Prodigy

  • Active Members
  • PipPipPip
  • 179 posts

Posted 10 May 2008 - 06:13 PM

Bug?

with this example,
$nr_min=0 $nr_max=10 MsgBox(0,'',$nr_max - $nr_min)

Math.au3 is not necesary in this case
thanks.

#56 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,765 posts

Posted 12 May 2008 - 01:48 PM

There is small bug:
commented lines with include files are treated as uncommented:

;~ #include <GuiTreeView.au3>

#57 Xenobiologist

Xenobiologist

    Xx Code~Mega xX

  • MVPs
  • 4,856 posts

Posted 13 May 2008 - 10:16 AM

Thanks, I'll check that.

Mega

Scripts & functions Organize Includes Let Scite organize the include files *new

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


#58 ReaImDown

ReaImDown

    Slacker

  • Active Members
  • PipPipPipPipPipPip
  • 557 posts

Posted 24 May 2008 - 10:16 PM

Thanks, I'll check that.

Mega



couple things that it doesnt seem to find include files for...I'm sure I fucked something up though lol

$WS_HSCROLL
$WS_VSCROLL
~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs

#59 Tweaky

Tweaky

    Wayfarer

  • Active Members
  • Pip
  • 77 posts

Posted 25 May 2008 - 07:59 PM

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 :)

#60 ReaImDown

ReaImDown

    Slacker

  • Active Members
  • PipPipPipPipPipPip
  • 557 posts

Posted 02 June 2008 - 01:56 AM

...love it...use it lots...you should add a check for updates option :)
~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users