Jump to content

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


Recommended Posts

Posted

Ok

 

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

  • Developers
Posted
  On 4/7/2023 at 9:08 AM, Marc said:

Hm, am I the only onle having the issue that the first 3 characters of each file get cut off when editing it?

Have an existing .au3 which starts with "#Region". When opening it in the new Scite, it starts with "gion", and the file immediatley gets saved with the first 3 Chars cut of.

Re-Adding the "#Re" and saving, the file on the disk is fine and works, untit I dare to open it in Scite again... I'm sure it has to do with BOM...

Re-installed the old version, everything's fine. 

Expand  

Could you try the SciTE version I have made available in either this x86 or X64 version of SciTE to see if that works for you?
It has a fix for the issue that an UTF8/16 with Bom was set to UTF8 without BOM and should now properly default to utf8 without BOM for Ascii files that only contain character with a value of 0-127. When it contains an an character with a value between 128-255 it is assumed we need to set the encoding to CodePage properties.

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 4/8/2023 at 6:30 PM, Jos said:

Could you try the SciTE version I have made available in either this x86 or X64 version of SciTE to see if that works for you?
It has a fix for the issue that an UTF8/16 with Bom was set to UTF8 without BOM and should now properly default to utf8 without BOM for Ascii files that only contain character with a value of 0-127. When it contains an an character with a value between 128-255 it is assumed we need to set the encoding to CodePage properties.

Expand  

Hi Jos,

took the files from your zip and replaced the files from c:\Program Files (x86)\AutoIt3\SciTE\ with the contents.

Help now says: 

32-bit
Version 5.3.5   Scintilla:5.3.4   Lexilla:5.2.4
    Apr  8 2023 19:51:08

But: same result as before.

As it seems to happen only on my system,  perhaps I screwed up some config files...?

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

  • Developers
Posted

Strange...  So when you download the file you attached and open it then it does fail?
If so, could you try downloading the original SciTE exe and try it with that version?

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)

Yepp, it fails with my testfile. 

Downloaded the original scite and go not problems when editing it. Here's what I see when opening first in original scite and after that in the latest Scite4AutoIt (destroying it):

image.png.9df1a59d347abeb23bb81e706575dbbc.png

Some things I checked:

  • Original file starts with 26 69 6e 63 6c 75
  • defect file starts with ef bb bf 63 75 - seems like the first 3 bytes are simply overwritten with the UTF-8 Header
  • renaming the Folder AppData\Local\AutoIt v3\SciTE\ does not change anything in this behaviour
  • after re-adding the overwritten "#in" and saving the file, it stays fine
  • Notepad++ detects my testfile as "UTF" and the file after saving it with the Scite4AutoIt-Editor as "UTF-8-BOM"

hope this helps...

Edited by Marc

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

  • Developers
Posted (edited)
  On 4/9/2023 at 8:16 AM, Marc said:
  • Original file starts with 26 69 6e 63 6c 75
  • defect file starts with ef bb bf 63 75 - seems like the first 3 bytes are simply overwritten with the UTF-8 Header
Expand  

Maybe I missed it, but how do you get the defect file created, as the downloaded file from you doesn't contain this defect (yet).
So what are the steps to get to this invalid BOM override? 

I have a gut feeling it has something to do with your NewFileEncoding setting, but simply can't replicate it myself yet, so no way to know where to start digging/debugging.

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
  On 4/9/2023 at 9:53 AM, Jos said:

So what are the steps to get to this invalid BOM override? 

Expand  

Darn! Ooookay, Put it on the "stupid idiot"-list,..

Invoking your Scite-Editor manually does everything right.

 I'm always using the "total commander" filemanager. Several years ago I wrote a launcher to decide which editor to use depending on the file extension. Which contains a funny bug... 🤦‍♂️

Embarassing.

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

Posted (edited)

@Jos today I continue with my speed issues.

I used:

dynamic.include.whiletyping=n

  Quote

## 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=n
#> 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=n
#> 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=y
#> 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=3
#> 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=500
#> Max number total UDFs in the Userlist to handle by dynamic includes. This doesn't including the standard AutoIt3 includes-UDFs.
dynamic.max.funcs=5000
#> Scriptlines longer that this value won't be looked at for Checking for required #Include statements.
dynamic.max.line.length=300
# Define minimum length before AutoComplete dropdown is shown- default=2
autocomplete.au3.min.length=3
 

Expand  

and also:

#SciTE4AutoIt3_Dynamic_Include_recursive_check=n
#SciTE4AutoIt3_Dynamic_Include_whiletyping=n
#SciTE4AutoIt3_Dynamic_Include=y


I especially disable the whiletyping feature according to:

  Quote
#> 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
Expand  

 

 when I type:

$ADO_adAddNew
$_WD_ERROR_ElementIssue

then this snippet was added at the top of script

#Region ; *** Dynamically added Include files ***
#include "z:\!!!_SVN_AU3\UDF_Forum\mLipok\ADO_CONSTANTS.au3" ; added:04/12/23 18:43:49
#include "z:\!!!_SVN_AU3\UDF_Forum\Other_Members\wd_core.au3" ; added:04/12/23 18:44:03
#EndRegion ; *** Dynamically added Include files ***

My intention was to have dynamic calltips and variables poped up but do not want to have automatically added any included files/directive at the top of script.

 

Do I missunderstand that whiletyping feature according to:

  Quote
#> 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=n
Expand  

should stop adding include  at the top of main script ?

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

  • Developers
Posted (edited)
  On 4/12/2023 at 4:50 PM, mLipok said:

today I continue with my speed issues.

Expand  

The speed issue is still there you mean?    

  On 4/12/2023 at 4:50 PM, mLipok said:

Do I missunderstand that whiletyping feature according to:

Expand  

There is a bug in the code that I have fixed and will be available in the next version.

... but the speed issue you had before was in AutoComplete, not the Add includes while typing logic. 
AutoComplete will still require all know Funcs&Var to be able to present them in the dropdown.

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)
  On 4/12/2023 at 5:02 PM, Jos said:

The speed issue is still there you mean?    

Expand  

Yes.

  On 4/12/2023 at 5:02 PM, Jos said:

There is a bug in the code that I have fixed and will be available in the next version.

Expand  

👍

  On 4/12/2023 at 5:02 PM, Jos said:

but the speed issue you had before was in AutoComplete, not the Add includes while typing logic.

Expand  

the issue which I had before:
AutoComplete was performed fast, the issue occurs only when I hit ENTER key.
So I assume that this is not related to POPING UP calltips but to adding INCLUDE file,
As far as I remember we was discussing that this is related to recursive search in "INCLUDE tree" because of searching if desired include file was already included or not.

  On 4/12/2023 at 5:02 PM, Jos said:

AutoComplete will still require all know Funcs&Var to be able to present them in the dropdown.

Expand  

yes but as far as I remember and according to my current understanding of this "dynamic LUA"

the recursive search in "INCLUDE tree" in case of AutoComplete is not pefrormed each time I press ENTER, but only when file is saved/changed.

 

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

  • Developers
Posted
  On 4/13/2023 at 4:53 AM, mLipok said:

AutoComplete was performed fast, the issue occurs only when I hit ENTER key.

Expand  

Ok... will try to update the installer and ZIP file either today or tomorrow so you can try the fix, but in case you can create some replication setup for the slowness,  I can have a look at that too in the coming days.

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

do you still have my DEV ENV reproducer which I post you via email few days ago?

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

  • Developers
Posted

Yes I have but that doesn't replicate it for me. The reason probably is that $_WD_DEBUG_Error is defined in "AutoItPortable\MyIncludeSet\OtherMembers\wdcore.au3"  which isn't part of the standard includes. You have commented the directories in this line so it will not be able to find wd_core.au3:

#SciTE4AutoIt3_Dynamic_Include_Path=;c:\AutoItPortable\MyIncludeSet\mLipok;=;c:\AutoItPortable\MyIncludeSet\OtherMembers;c:\AutoItPortable\MyIncludeSet\Priv

When I remove the ; after the =, it is able find  $_WD_DEBUG and the include is properly inserted without any delay. 😕

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)

@Jos I just create separate DEV ENV reproducer with two versions in separate folder:    "SciTEv5_Fast " and "SciTEv5_Slow"

which are a base for testing: test8_Speed.au3

and

using SciTEv5_Fast I get:

  Quote

> time: 0.03 secs Dropdown for $_wd_debug_error with 1 item(s) out of 15663
--> AddMissingIncludes wordcheck $_WD_DEBUG_Error time: 0.67 secs
--> AddMissingIncludes linecheck  time: 0.04 secs

Expand  

 

using SciTEv5_Slow I get:

  Quote

> time: 0.03 secs Dropdown for $_wd_debug_error with 1 item(s) out of 15663
--> AddMissingIncludes wordcheck $_WD_DEBUG_Error time: 2.15 secs
 

Expand  

 

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

Posted
  On 4/13/2023 at 8:33 AM, Jos said:

The reason probably is that $_WD_DEBUG_Error is defined in "AutoItPortable\MyIncludeSet\OtherMembers\wdcore.au3"  which isn't part of the standard includes

Expand  

but it can be recursivly found in: 

#include "c:\AutoItPortable\MyIncludeSet\All_UDF.au3"

 

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
  On 4/13/2023 at 8:40 AM, mLipok said:

@Jos I just create separate DEV ENV reproducer with two versions in separate folder:    "SciTEv5_Fast " and "SciTEv5_Slow"

Expand  

Link sent via PM.

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

I wonder if it will be possible to add recursive LIST of used include to be more "static" 

What I mean here is to have:

LIST generated on file save, or file switch, file open

instead

LIST generated dynamicaly per each ENTER usage

 

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

  • Developers
Posted

That is the case already when you have the local cache enabled, but lets agree that 30 seconds is simply wrong and should never happen, not even one time at save!
All my tests so far have shown that there is nothing to gain to enable the cache for local files. 
There has to something wrong in the logic of the LUA scripts for your well known big ass setup that I haven't encountered yet, so hope your last zip will also show the problem to me and I am able to squash that bug. :) 

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

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...