Jump to content

BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs


Recommended Posts

  • Developers
Posted
  On 3/3/2025 at 3:26 PM, donnyh13 said:

Still not working, but my version is still off?

Expand  

It reflects the last modified date/time so it could be different when I have ran the installer myself after merging the changes into the Repository. I've checked the sources are the same. In case it doesn't work, then please enable the debugging and share the debug log with me.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

I edited my post, but since we are on a new page, here it is again:

  Quote

!08:30:12 AutoItDynamicIncludes->! ===== Start AddMissingIncludes for ALL to current script C:\Users\Owner\Desktop\Testing.au3
 08:30:12 AutoItIndentFix->BeginEvents->OnStartup->### <<< AutoItIndentFix:OnStartup
 08:30:12 AutoItDynamicIncludes->BeginEvents->OnStartup->### <<< AutoItDynamicIncludes:OnStartup
 08:30:12 AutoItIndentFix->BeginEvents->OnStartup->### <<< AutoItIndentFix:OnStartup
 08:30:12 AutoItDynamicIncludes->BeginEvents->OnStartup->### <<< AutoItDynamicIncludes:OnStartup
-08:30:12 AutoItDynamicIncludes->reload_apis->->reloadproperties:
>08:30:12 AutoItDynamicIncludes->>> All:0-46
 08:30:12 AutoItDynamicIncludes-> => 0 2 -1 | _Word_Create 0 0
 08:30:12 AutoItDynamicIncludes-> => 0 4 2 | MsgBox 4 0
 08:30:12 AutoItDynamicIncludes-> -> 0 4 4 | $MB_OK 9 8
 08:30:12 AutoItDynamicIncludes->  Add atSourceWords Word $MB_OK :9
 08:30:12 AutoItDynamicIncludes->### Start processing found words
 08:30:12 AutoItDynamicIncludes-> -> $mb_ok 9
 08:30:12 AutoItDynamicIncludes->==> Initial VARIABLE FILE globalconst tableload: 3
 08:30:12 AutoItDynamicIncludes->==> Initial VARIABLE STD globalconst tableload: 0
>08:30:12 AutoItDynamicIncludes->> Variable FILE: $mb_ok iFileName:  Includename:  Includepath:
>08:30:12 AutoItDynamicIncludes->> Variable STD: $mb_ok igFileName:  gIncludename:  gIncludepath:
-08:30:12 AutoItDynamicIncludes->- UDFs         Processed:0
-08:30:12 AutoItDynamicIncludes->- Global Const Processed:1
> done, no includes to add.(v20252602 0537)

 

Expand  

Using Script:

_Word_Create()

MsgBox($MB_OK, "", "")

With Debug enabled:

debug.autoitdynamicincludes=Y
debug.autoitautocomplete=y
debug.autoitindentfix=y

 

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

Posted

If it's working on your end, perhaps it's something on my end. Maybe I'll try playing with some stuff and see what's happening.

Thanks for your help Jos. :)

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted

Looks like you aren't picking up all standard stuff you get 0 for the second line while I get:

15:52:49 AutoItDynamicIncludes->==> Initial VARIABLE FILE globalconst tableload: 226
 15:52:49 AutoItDynamicIncludes->==> Initial VARIABLE STD globalconst tableload: 13673

You might want to get rid if those cache files so they will be rebuild. 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

I deleted both the "AppData\Local\AutoIt v3\SciTE" and "\Program Files (x86)\AutoIt3\SciTE" folders and let the the installer re-fill it with files. This should have done it?

Edit: Sorry, not just the lua folder, but all the Scite Folder.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

Posted (edited)

Here is my new, current User properties.

import au3.UserUdfs
import au3.keywords.user.abbreviations



## ------------------------------------------------------------------------------------------------------------------------
## dynamic.include Directives and properties reference
## -----------------------------------------------------
#SciTE4AutoIt3_Dynamic_Include=y                               ;dynamic.include=y/n
#SciTE4AutoIt3_Dynamic_Include_whiletyping=y                   ;dynamic.include.whiletyping=y/n
#SciTE4AutoIt3_Dynamic_Include_recursive_check=n               ;dynamic.include.recursive.check=n/y
#SciTE4AutoIt3_Dynamic_Include_use_local_cache=n               ;dynamic.include.use.local.cache=n/y
#SciTE4AutoIt3_Dynamic_Include_version=prod                    ;dynamic.include.version=prod/beta
#SciTE4AutoIt3_Dynamic_Include_verboselevel=0                  ;dynamic.include.verbose.level=0/1/2
#SciTE4AutoIt3_Dynamic_Include_Path=

#SciTE4AutoIt3_AutoItDynamicIncludes_debug=n                   ;debug.autoitdynamicincludes=n/y
#SciTE4AutoIt3_AutoItAutocomplete_debug=n                      ;debug.autoitautocomplet=n/y
#SciTE4AutoIt3_AutoItGotoDefinition_debug=n                    ;debug.autoitgotodefinition=n/y
#SciTE4AutoIt3_AutoItTools_debug=n                             ;debug.autoIttools=n/y

## ================================================
## dynamic.include config
## ================================================
#> dynamic.include=y/n  n=disabled  y=will automatically build the func tables for coloring and autocomplete (requires restart SciTE!)
dynamic.include=y
#> whiletyping=y/n      n=disabled  y=will automatically add any required standard or USERincludefile for the current line, on the fly, when ) or enter ispressed !)
dynamic.include.whiletyping=y
#> use.local.cache=n/y  n=disable   y=Use cache file for local Include UDFs and VARs which could increase the speed when you have a lot of local includefiles which normally shouldn't be the case
dynamic.include.use.local.cache=n
#> version  prod=Use AutoIt3 Production version    beta=Use AutoIt3 Beta version
#~ dynamic.include.version=prod
#> recursive.check=n/y  n=disable   y=When you like to only add an Include when it isn't included through another #included file yet.
dynamic.include.recursive.check=y
# level of debug messages 0/1/2     0=disabled; 1= Warnings & Timing per Function; 2=1+Total timing
#~ dynamic.include.verbose.level=0
#> Max number of includes files to read from the user directories in the list. This doesn't including the standard AutoIt3 includes.
dynamic.max.includes=300
#> Max number total UDFs in the Userlist to handle by dynamic includes. This doesn't including the standard AutoIt3 includes-UDFs.
dynamic.max.funcs=3000
#> Scriptlines longer that this value won't be looked at for Checking for required #Include statements.
#~ dynamic.max.line.length=300
## ================================================
## Autocomplete and call tip settings
## ================================================
#~ autocomplete.au3.disable=0
autocomplete.au3.ignorecase=1
# Define minimum length before AutoComplete dropdown is shown- default=2
autocomplete.au3.min.length=2
# Include Abbrevs in AutoComplete dropdown (default=1/y)
#~ autocomplete.au3.include_abbrevs=1
# Don't show AutoItComplete with these styles (Internal only in SciTE4AutoIt3)
#~ autocomplete.ignore.styles.$(au3)=1;2;3;6;7;10;13
# Define which character will be added after Tab or Enter was entered and not on a Function/UDF: Can be \s \t \n for space;tab;newline
#~ autocomplete.au3.on.enter=\n
#~ autocomplete.au3.on.tab=
# List of all AutoComplete API files used
#~ api.$(au3)=$(SciteDefaultHome)\api\au3.api;$(SciteDefaultHome)\api\au3.autoit3wrapper.api;$(SciteUserHome)\au3.std.dynamic.calltips.api;$(SciteUserHome)\au3.file.dynamic.calltips.api;$(SciteUserHome)\au3.usr.dynamic.calltips.api;$(SciteUserHome)\au3.user.calltips.api


## ================================================
## Separate settings for debugging these Lua files
## ================================================
#> Enable debugging for these lua scripts:
debug.autoitdynamicincludes=Y
debug.autoitautocomplete=y
# debug.autoitgotodefinition=n
 debug.autoitindentfix=y
# debug.autoittools=n
#> when debug.tofile is defined, log records will be send to the log in stead of OutputPane:
 debug.tofile=
#~ debug.tofile=$(SciteUserHome)\SciTE_LUA_Scripts_Debug.err
#~ # ------------------------------------------------------------------------------------------------------------------------

 

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

Posted (edited)

Both of my tbl files are currently empty.

[snip]

  Quote

return {
-- Table: {1}
{
},
}

Expand  

 

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted

That's what I expected as the log stated there were no Global variables.
I would need the log that is generated at startup of SciTE as that is the time these files are build. We can take this offline (PM/EMail) when you want.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Okay. What debugging should I turn on etc. and I would set the " debug.tofile=" correct?

Edit: PM sent.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted

Uploaded an updated installer that contains the fix for dynamic includes not reading the standard includes correctly.
Thank you for the support @donnyh13

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Thanks for your time and effort in developing and debugging the Scite tools Jos, Much appreciated!

Edit: By the way, I look forward to this, if it's possible.

  On 3/3/2025 at 2:39 PM, Jos said:

PS: I have it on my list to look at also scanning through the user includes as defined in the registry,

Expand  
Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted
  On 3/3/2025 at 6:50 PM, donnyh13 said:

By the way, I look forward to this, if it's possible.

Expand  

Anything is possible when you put your mind to it and have some time to burn. 🙂 

preview version: https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/addincludes/AutoIt3Wrapper.au3

It scans for any potential Include files  *.au3 file that contain a Func names with format  _*.au3  and *Constants*.au3 files for Global Const $vars  defined in these paths:

  • @Scriptpath
  • @Scriptpath\include
  • @AutoIt3Dir\include
  • Any defined private include directories in RegRead("HKCU\Software\AutoIt v3\Autoit", "Include")

It takes a couple of seconds for me to read all include files for UDFs & Vars and then depending on the script size again a few seconds to check if any #include is required and found/known.

Maybe some can try it to see how it performs on their systems.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 3/4/2025 at 7:40 PM, Jos said:

Maybe some can try it to see how it performs on their systems.

Expand  

I will check deeply next few days ... don't call the wolf out of the forest ;)

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

It works good Jos! Thank you!

I tested it briefly using this in the LibreOffice development folder:

_LOCalc_CellFontColor()

MsgBox($MB_OK, "", "")

_Word_Create()

and it took ~7 seconds before the ArrayDisplay came up. And then some weird output message in the Terminal (This could be my own problem, as I occasionally have display issues with VSC.). But I can't reproduce this after the first two times. But the ArrayDisplay sometimes comes up using this script.

I then tested with this:

_LOCalc_CellFontColor()

MsgBox($MB_OK, "", "")

_Word_Create()

_LOWriter_VersionGet()

And it took ~8 seconds, but missed the MsgBox Constants. However no array display, and only normal messages in the terminal.

Edit: Tried it again and it took 5 seconds. Msg Box constants still don't get added with the lower script.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted (edited)

The _arraydisplay shouldn't happen and is there for my debugging during development, fixed that in the current version of the preview.
Does au3check tell you all is fine, or do you get an error?
Reason for the question is that currently, in case the #include file is already included through another include, it will not be added to the master.
This is a different behavior than the default Dynamic Includes does and equals: #SciTE4AutoIt3_Dynamic_Include_recursive_check=y
It can be changed to work the same as Dynamic includes version and include all in the master, ignoring the recursive includes.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Thanks for the explanation on the ArrayDisplay.

No AU3 is not giving an error. You're right, sorry I missed that, MsgBox constants was included down one of the rabbit holes of includes :D

I think  this is a good method to prevent clutter/ unnecessary includes, so maybe no need to change it?

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

  • Developers
Posted (edited)

Well i am actually in favor of including the files required in the master itself and not depend on a possible include in the included file. There is no real clutter as the udf and constant file have a #include_once in them.

I probably will change the default and can make it a choice like I've done in the dynamic lua stuff.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Right, I forgot about #include-Once. In that case, that does sound better.

Thanks Jos.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

  Reveal hidden contents

 

Posted (edited)

I notice some issues with Au3Stripper.
Repro script sent via PM few hours ago.
Thanks in advance for working on this.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

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