Jump to content

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


Recommended Posts

Posted

 

The same will happen when you use one of the Global Const variables from one of the *constants*.au3 includes in the defined include directories.

+1 for this long-awaited feature.

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 7/1/2022 at 2:30 PM, Jos said:
Expand  

would you also like comments on the redaction of this document (colors, typos, whitespaces, etc... ) ?

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 7/1/2022 at 6:38 PM, mLipok said:

would you also like comments on the redaction of this document (colors, typos, whitespaces, etc... ) ?

Expand  

Nope..  Please focus on the Functionality and don't worry about the Doc for this moment. This is just a base doc to explain what it does en the rest will come when we have a proper functioning system! ;) 

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 7/1/2022 at 6:38 PM, Jos said:

I don't understand that remark ..... now it is including them on the fly as for UDFs. ;) 

Expand  

And exactly this was awaited to do the things on the fly.

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)

The same will happen when you use one of the Global Const variables from one of the *constants*.au3 includes in the defined include directories.

just tried with:

#Region ; *** Dynamically added Include files ***
#include <Array.au3>                                         ; (07/01/22 21:10:00
#include <File.au3>                                          ; (07/01/22 21:11:20
#EndRegion ; *** Dynamically added Include files ***

_ArrayAdd(

_FileListToArrayRec(

$FLTAR_

$MB_YES

Trying $FLTAR_ and $MB_YES but it is not "extending".

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 7/1/2022 at 7:17 PM, mLipok said:

Trying $FLTAR_ and $MB_YES but it is not "extending".

Expand  

There is no $MB_YES as far as I know...   and $FLTAR_ is only a partial variable, and it will only expand exact typed existing variables.
so please provide (as usual) what you think is expected (no cystalball remember) , like in this case ....which Include file did you expect to be included.
One other thing: You can also do some debugging in this last version by setting property: autoittools.debug=1  , restart SciTE and do the same thing. An Debug log will be created in: $(SciteUserHome)\dynamic_udfs.err    which contains a shitload of information about what is found where and what is happening. If you want me to have a look at that then Email me that file (Don't attach here please!, but email!) to avoid polluting the threat with way to many details. :) 

Edited by Jos
Typos

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

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

Your question triggered another very nice option for this....  an AutoComplete option for Gobal Const after you typed "$\w{2}_". So for a Variable with at least a length of 4 and the last character is am _ it will present a list with possible variables from the Global Variable Table.      THANKS!! :) 
I got some basics working for that, just need more time to test and see which can-of-worms I just opened....   

 

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)

Just uploaded a new LUA.ZIP that contains the changes for getting an AutoComplete ListBox for known Global Const variables and when one is selected the #include is also added when needed. This is really f...ing awesome and should have made these changes 10 years ago to save all the typing. :) 

dynamic_complete9.png.5c31fce604d3e78858c8bfdffa189a24.png

Still need to add this to the Docs, but lets first see whether this a stable and properly working for all obscure causes you all have out there.

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)

Made another update for lua.zip so the Var AutoComplete will now show local variables together with the Global Const Variables.
Local Variables are immediately  shown when you type a $.
Global Variables will only be added when in total 3 characters ($ab) or more are typed, as else things will slow down too much due to a possible very long variable dropdown list.

Jos

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

  • Moderators
Posted

Jos,

So far this is working perfectly - but then I have a nice vanilla install!

Thanks so much for all the work that you have put into this.

Steve G

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted
  On 7/1/2022 at 8:38 PM, Jos said:

Your question triggered another very nice option for this....  THANKS!! :) 

Expand  

You're welcome

  On 7/1/2022 at 9:59 PM, Jos said:

This is really f...ing awesome and should have made these changes 10 years ago to save all the typing. :) 

Expand  

as I said: this was long-awaited feature.

I'm glad that my not well-worded conclusions put you on the right track ;)

 

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

Awesome:

image.png.c8a05a01629cefa4c670d4a1aed390a6.png

 

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)

There are still some quircks in the current version that I am working on. Mainly to do with a mix of Global Const and File Variables, so please stay tuned for an update for that.
One other thing will be that when you use an Variable name that is exactly the same as an Global Const, the Include file will now be added anyway and you end up with a duplicate definition. ....   that one feels like a Catch 22 at this moment.  
I have "solved" that for now by adding a test for ($Varname\s*=) and when that exists in the current file I assume the file is defined in the script itself and won't look for a global var. 

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

Just uploaded a new lua.zip with the following fixes/changes:

  • Local file Variables are properly read and added to the DropDown box together with the Global vars.
  • Decided that the GlobalVars will be displayed right away after the second character is typed. This means that for example $s will trigger a dorpdownlist of some 2700+ lines out of the 13175 Global Variable and you need to add the local file Variables starting with $s to that. :) 
  • Detect when a File Variable has the same name as an Global Const Variable by simply testing for "$Varname\s*="

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 7/2/2022 at 1:46 PM, Jos said:

Added "video" to startpage to show how it works when implemented.

Expand  

Nice video, awesome feature:

dynamic_demo2.gif

 

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