Jump to content

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


Recommended Posts

Posted

To be honest @Baraoic, I don't see the problem or at least it's not a big one.

In VS Code is the behavior the same, except the fact that the correct variable $aDirs is the first suggested item.

autoit-vscode-suggested-items.png

When you type more characters, the list will decrease and that's a common behavior like for other languages (and VSCode).
So in my personaly experience it's not distracted at all, but that's me of course.

Best regards
Sven

==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet🔗 autoit-webdriver-boilerplate

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Posted
Posted (edited)

Thanks @Nine. Understandable, yes. Also more preferable, I agree.
In my case it doesn't matter, because I use VSCode and GitHub Copilot which takes over the suggestion and autocompletion part entirly.
Means the correct context (block) based variable is autocompleted and I don't see such problems.

For the test and for the screenshot (I made), I turned GitHub Copilot off, to simulate the behavior without my setup.

Anyhow, thanks for the clarification, the old version is more preferable, yes (at least for SciTE).

Best regards
Sven

Edited by SOLVE-SMART

==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet🔗 autoit-webdriver-boilerplate

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

  • Developers
Posted (edited)

Nice that a new feature, which now also considers the included files  and standard includes with AutoComplete, is considered an issue. 
Simply disable the new feature in your setup, and all will be as it was before... nice and limited. 😉

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

  • Developers
Posted (edited)
3 hours ago, argumentum said:

..since we're talking about it, the reason I don't use SciTE v5 is the autocomplete. If that could be changed in a LUA file ( or somewhere ) to behave like in v4, I'd give it a go.

2 things:

1. SciTE is totally unrelated to the new lua scripts in the Scite4autoit3 package.

2. If you would take the time to read or even ask, you would quickly find out that it is configurable in the new setup.

I honestly fail to see why it isn't useful but won't shed any tears and have decided I won't be doing any new development on the lua-scite stuff as its clear their is hardly anybody that care except for a few regulars.

 

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
29 minutes ago, Jos said:

2 things:

1. SciTE is totally unrelated to the new lua scripts in the Scite4autoit3 package.

2. If you would take the time to read or even ask, you would quickly find out that it is configurable in the new setup.

Am a bit out of touch with v5. I want to install 3.3.18.0 with the SciTE v5 ( in another PC ), given that all my setups are still with 3.3.16.1.

What do I run to install the v5 ? Run the SciTE4AutoIt3_vsc.exe and update with the SciTEx64.zip ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
2 hours ago, Jos said:

I honestly fail to see why it isn't useful but won't shed any tears and have decided I won't be doing any new development on the lua-scite stuff as its clear their is hardly anybody that care except for a few regulars.

Understandable from my point of view @Jos.

I though you already wanted to focus more on "VSCode first" development as we (some of us) discussed this in thread Visual Studio Code Extension currently available and future plans for SciTE?. Maybe I misunderstood your statement in the different posts (of the thread), but anyway, thanks for the effort 🤝 .

Best regards
Sven

==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet🔗 autoit-webdriver-boilerplate

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Posted
16 minutes ago, Nine said:

Use my searchcontent tool in scite folder.  You should find it in no time.

oh !, but I do use your script. Is the best there is. Just awesome.
The problem is in that while coding I press "$i" and the list from every include makes it cumbersome to select those in the script, hence my request.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
7 hours ago, Jos said:

2 things:

1. SciTE is totally unrelated to the new lua scripts in the Scite4autoit3 package.

2. If you would take the time to read or even ask, you would quickly find out that it is configurable in the new setup.

I honestly fail to see why it isn't useful but won't shed any tears and have decided I won't be doing any new development on the lua-scite stuff as its clear their is hardly anybody that care except for a few regulars.

 

I do appreciate your work and I'm sure some people enjoy the recursive autocomplete, but I personally don't.

I use vscode for powershell and while it does add some extra random ones, it only adds a handful at worse, not nearly as many.

I'm asking how to change it because I couldn't figure out how? The install process didn't appear to have that option as far as I can tell. I did open SciTEGlobal.properties and skim through there and even tried changing a few, but that didn't help. So I figured I'd just ask instead of randomly changing properties.


 

2 hours ago, Nine said:

Use my searchcontent tool in scite folder.  You should find it in no time. :)

I asked the question because I couldn't figure out what property to change... If you know the property name then please do share.

Posted
2 hours ago, Nine said:

I mean search for autocomplete in all files in scite folder. You will find it.

setting dynamic.include=n in au3.properties does set it back to the old style, but it also breaks the new auto include, which was really nice and I'd like to keep.

I already messed with the autocomplete options in that file before my initial post and they don't help.

It looks like AutoItAutoComplete.lua controls both the include logic and autocomplete logic, but trying to just revert only the autocomplete is more complicated than it appears. I do see it has a Old_AutoComplete function it uses on unsaved files, but that also doesn't allow the new auto include so I'd have to change the main autocomplete function while not breaking the auto include. Will have to look into it more tomorrow.

Posted (edited)
9 hours ago, argumentum said:

How can I declare to only include the variables is the current script ?

27 minutes ago, Baraoic said:

dynamic.include=n in au3.properties does set it back to the old style, but it also breaks the new auto include, which was really nice and I'd like to keep.

Ok that did solve the long list of unrelated variables but also took away other new interesting features.

Any way to separate the type of autocomplete ?, variables vs. functions ? .... but I'd like to keep the variables of the includes that are not UDFs ...so, a way to exclude via an exclude list of variables to not present as part of the list of variables 😅

Goodness, am a pain. I should have asked these questions a year ago when you were actively working on it.

Edit: @Jos please put the baseball bat down and don't hit me. It is as it is, and if I participated earlier ... it wouldn't be so frustrating for you dealing with these questions so late in the game.

Edited by argumentum
feel bad about my questions

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

  • Developers
Posted (edited)
On 1/7/2026 at 4:38 AM, Baraoic said:

Thank you for the update. I love the auto Include and it works great, but is it possible to set auto complete back to the old way? I hate the auto complete being filled with completely irrelevant options as in the screenshot.

 

Ok, so tell me which part in your mind is irrelevant in your example in general and do you not see the Variable you are looking for at the top when you type the proper starting characters? Ok, its maybe not at the first place in the list, but it should be close to the top.
One of the nice things about the new version is that it also matches the typed characters after the $ inside the options, which means you do not have to remember the exact starting characters anymore. 

In case you are looking for the standard SciTE behaviour, you could type Ctrl+Enter when the full list is shown and it will switch to the old list.

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

  • Developers
Posted (edited)

To make the AutoCompletelist configurable as to what is shown you could make a few simple changes:

to your user.properties add lines:

# Use only current file for autocomplete options / old behaviour
autocomplete.au3.currentonly=y

Change if on line 298 in AutoItAutoComplete.lua to:

   -- check if Dynamic is used and the Filename <> "" (Happens when the file isn't saved yet)
   -- also check for autocomplete.au3.currentonly=y to force old behaviour
   if not AutoItDynamicIncludes:Dynamic_includes() or props['FileNameExt'] == '' or props['autocomplete.au3.currentonly']:match('[1yY]') then
      -- Use Old behaviour
      AutoItAutoComplete:Old_AutoComplete(c)
      return false
   end

... but I still want to list all possible variables for GUI, WIN..etc UDFs plus all possible functions in the project, as I can never remember their exact spelling. 😉 

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
3 hours ago, Jos said:

To make the AutoCompletelist configurable as to what is shown you could make a few simple changes:

to your user.properties add lines:

# Use only current file for autocomplete options / old behaviour
autocomplete.au3.currentonly=y

Change if on line 298 in AutoItAutoComplete.lua to:

   -- check if Dynamic is used and the Filename <> "" (Happens when the file isn't saved yet)
   -- also check for autocomplete.au3.currentonly=y to force old behaviour
   if not AutoItDynamicIncludes:Dynamic_includes() or props['FileNameExt'] == '' or props['autocomplete.au3.currentonly']:match('[1yY]') then
      -- Use Old behaviour
      AutoItAutoComplete:Old_AutoComplete(c)
      return false
   end

... but I still want to list all possible variables for GUI, WIN..etc UDFs plus all possible functions in the project, as I can never remember their exact spelling. 😉 

Perfect, that's exactly what I wanted. Thank you.

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
×
×
  • Create New...