Jump to content

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


Jos
 Share

Recommended Posts

  • Developers
1 hour ago, donnyh13 said:

Welcome, I noticed one more thing, when declaring or using an array, or perhaps a map too, after typing the name and pressing "[" I get the following error after each "$aArray[".

Same issue as the other one and know what the issue is. Will have a fix for that soon.

As to the other issue: it should use the already included file, so it would be helpful when you can enable the debugging, gonyhrough the steps and send me the log file.

Cheers.

 

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

Link to comment
Share on other sites

6 minutes ago, Jos said:

so it would be helpful when you can enable the debugging, gonyhrough the steps and send me the log file

Okay, I did in the last post already, maybe I didn't make it clear. Sorry.

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

  • Developers

Ah, sorry about that...am looking on my cellphone and missed that. Will try to have a look tomorrow and let you know.

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

Link to comment
Share on other sites

  • Developers

Please give the current version of AutoItAutoComplete.lua included in SciTE_changes_Dynamic_Includes_LUA.zip a try as that should fix the invalid regex warning you have seen.

 

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

Link to comment
Share on other sites

  • Developers

Did you set debugging for both on when you produced the log file?

#SciTE4AutoIt3_AutoItDynamicIncludes_debug=y
#SciTE4AutoIt3_AutoItAutocomplete_debug=y

- or - 

debug.autoitdynamicincludes=y
debug.autoitautocomplet=y

 

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

Link to comment
Share on other sites

1 hour ago, Jos said:

Please give the current version of AutoItAutoComplete.lua included in SciTE_changes_Dynamic_Includes_LUA.zip a try

Will do, thanks.

Edit: Thanks Jos, that fixed those two errors. 👍

49 minutes ago, Jos said:

Did you set debugging for both on when you produced the log file?

Yes, sort of -- Since the display issue I had before I've just left all turned on,

debug.autoitdynamicincludes=y
debug.autoitautocomplete=y
debug.autoitgotodefinition=y
debug.autoitindentfix=y
debug.autoittools=y

If that causes too much clutter, I can turn all others off if need be.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

Hi Jos, found another possible error? If I type a single letter behind a word in a commented line, an auto-complete dropdown appears. (Notice the "f" before "Modify"

 

Here's the debug log (attached).

 

By the way, I really like the changes, saved and unsaved, being highlighted on the edge and underlined. Thank you. Also really liking the auto-complete /tooltip etc modifications, and also making it work with user UDFs  is incredibly handy. Great additions!

 

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

  • Developers

@donnyh13,

I have been working on a number of changes to these scripts in the background for while and would like you to test with that version when you don't mind.
The reason is that this issue with the dropdown is not happening in that version, but only in the version that is published.
Maybe also the issue with that extra #Include<> is fixed in that one as I do remember having changed things a bit in the logic.
The current SciTE_changes_Dynamic_Includes_LUA.zip contains these updated scripts.  

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

Link to comment
Share on other sites

@Jos,

Thanks, That fixed the drop down issue. It also fixed some form of encoding issue I had recently found too, but hadn't reported yet. But the include problem persists. I'll monkey with it more and see if there's a more definite cause, so you can reproduce it.

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

Okay, it seems that the include problem is occurring only when there is a definite path ("C:\Path\Path\File.au3"), not a relative path ("Path\Path\File.au3". Perhaps I'm using #Includes wrong?

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

Hi Jos, one more minor note, I cannot Select "#Include" lines and just backspace them, I have to hold back space. They select, but pushing backspace seems to do nothing.

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

  • Developers
17 hours ago, donnyh13 said:

Okay, it seems that the include problem is occurring only when there is a definite path ("C:\Path\Path\File.au3"), not a relative path ("Path\Path\File.au3". Perhaps I'm using #Includes wrong?

I can now replicate the issue so will have a look why this is happening.  tnx

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

Link to comment
Share on other sites

  • Developers
16 hours ago, donnyh13 said:

Hi Jos, one more minor note, I cannot Select "#Include" lines and just backspace them, I have to hold back space. They select, but pushing backspace seems to do nothing.

Not sure what isn't working here? I can simply select the whole line(s) and hit backspace to remove it.
So could you elaborate?

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

Link to comment
Share on other sites

  • Developers
1 hour ago, Jos said:

I can now replicate the issue so will have a look why this is happening.  tnx

Please give the current SciTE_changes_Dynamic_Includes_LUA.zip version a try, which contains an update for AutoItDynamicIncludes.lua.

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

Link to comment
Share on other sites

13 hours ago, Jos said:

Please give the current SciTE_changes_Dynamic_Includes_LUA.zip version a try, which contains an update for AutoItDynamicIncludes.lua.

Still doing the same thing for me. I'll see if anything changed about the problem.

Edit*

Okay, if the Script I am working on is say on my desktop, and the UDF I am #Including is in a folder on my desktop the DynamicInclude now places the correct path to it (#include "\123\ABC\LibreOfficeWriter.au3"), but still misses that I already have the #Include manually inserted if my include is formatted as: #include "C:\Users\Dave\Desktop\123\ABC\LibreOfficeWriter.au3", and not as  "#include "\123\ABC\LibreOfficeWriter.au3". But if the UDF isn't in a similar path (say not in a folder on my desktop, for this example, but in my C Drive), the DynamicInclude still misses my manual #Include, and places only #include <LibreOfficeWriter.au3>  instead of #include "C:\Autoit Scripts\Autoit\Libre Writer UDF files\LibreOfficeWriter.au3".

Seems like you made some progress though. — Just my two cents, as I don't know how your script works, nor do I know much about lua. But to use Autoit terms, it looks like when it checks the already available #includes, it is doing a Path1 = Path2, rather than a StringInStr(Path1,Path2) search?, and the path the script has saved as required for the UDF is not the whole path, (or no path at all (see pics below))?

For example, here is a test script located on my desktop, the UDF is in a folder on my desktop, notice the UDF requirement listing in the dropdown:

2023-09-1812_14_29-C__Users_Dave_Desktop_NewAutoItv3Script.au3_SciTE6of6.png.f2e8dbaf68859dfee5c4b90af8c82270.png

(Side note, I notice the udf path always lower cases the au3 script name, the proper name is "LibreOfficeWriter.au3")

Now notice this, the test script is still on my desktop, the UDF file is on the C drive, notice the UDF requirement listing in the dropdown:

2023-09-1812_12_33-C__Users_Dave_Desktop_AutoitTestScriptsLibreWriter_NewTesting.au3_SciTE.png.161cf4981949ff0da77b80bf832d7dec.png

(Another side note, is this a typo, "..FileUDFr" ? Shouldn't it be "..FileUDF"?)

Not sure if my 2 cents help anything.

14 hours ago, Jos said:

I can simply select the whole line(s) and hit backspace to remove it.
So could you elaborate?

If I select a #Include line, say from right to left and hit backspace, the line stays selected selected, but the "changes" little arrow points at the beginning of the line, if I press it again the #Include line goes up a line (while remaining selected). If I select a #Include line from Left to Right and hit backspace, the behaviour is the same as if I had just clicked at the end of the line, it backspaces one character at a time while remaining selected. Perhaps it's something related to my display error, and isn't a problem otherwise? Just to be clear, I can select any other line and backspace it, it's just the #Include lines doing it. If I press ENTER, the line erases fine.

Edit*

Further, if I select multiple #Include lines the behaviour is the same, but if my selection ends outside of an #include line, I can backspace without an issue.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

  • Developers
13 hours ago, donnyh13 said:

Still doing the same thing for me. I'll see if anything changed about the problem.

I will do some more testing but couldn't get it to go wrong anymore before after the last change. 

 

13 hours ago, donnyh13 said:

For example, here is a test script located on my desktop, the UDF is in a folder on my desktop, notice the UDF requirement listing in the dropdown:

I have seen that the dropdown doesn't contain the proper path for full path includes, but that is cosmetic so don't worry about that for now.

 

13 hours ago, donnyh13 said:

(Another side note, is this a typo, "..FileUDFr" ? Shouldn't it be "..FileUDF"?)

Not a Typo but added the r as there are 2 places these entries are generated and this is one of them, so it indicates to me which one generated it, again just cosmetic. ;) 

Let's focus if there is a simply way for me to replicate what you see with the dynamic includes adding it for the second time. 
One thing you could do for me is: 

  • Add these lines at the top of your test master script: 
#SciTE4AutoIt3_AutoItDynamicIncludes_debug=y
#SciTE4AutoIt3_AutoItAutocomplete_debug=y
  • Close SciTE
  • Delete the .Dyn*.tbl cache files which are located in the same directory as SciTEUser.properties.
  • Delete the au3.*.dynamic.calltips.api files which are located in the same directory as SciTEUser.properties.
  • Delete the SciTE_LUA_Scripts_Debug.err log in the same directory
  • Start SciTE and open your script and go through the steps which add's the invalid duplicate include.
  • Zip the above files and make the ZIP file available to me so I can check some more things.

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

Link to comment
Share on other sites

  • Developers
13 hours ago, donnyh13 said:

If I select a #Include line, say from right to left and hit backspace,

I have been able to replicate this behavior so will have a look.  thanks

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

Link to comment
Share on other sites

  • Developers

Uploaded a fix for:

  • Backspace selected #include line
  • API UDF path/description for the include file required.

Can't get the duplicate include to go wrong yet. Will do some more testing later.

Think/hope I found the reason why this is happening and updated the lua script, so please try this last version.

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

Link to comment
Share on other sites

4 hours ago, Jos said:

Uploaded a fix for:

  • Backspace selected #include line
  • API UDF path/description for the include file required.

Can't get the duplicate include to go wrong yet. Will do some more testing later.

Think/hope I found the reason why this is happening and updated the lua script, so please try this last version.

I can confirm both problems are fixed. Thanks Jos! 👍

Everything seems to be working as expected now.

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Link to comment
Share on other sites

Hi Jos,

I have a quick question, what exactly is this for, and how is it supposed to work?

# 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

I have left it alone until now, but I've noticed that after pressing enter on a autocomplete suggestion while calling variables in a function, a newline is inserted after the variable, which sounds like  the opposite of what should happen based on the definition? Setting "autocomplete.au3.on.enter=" to blank has fixed that problem however.

I'm just wondering if this is proper behaviour, and I am just misunderstanding the description?
 

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

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