Jump to content

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


Recommended Posts

  • Developers
Posted
  On 7/11/2022 at 8:14 AM, Jos said:

When it doesn't then send me that logfile so I can see what is going on and don't have to guess.

Expand  

Scratch that ...  As I said before: My current version is totally different from what you have, so just wait for me to be done with it and simply don't use it when it is causing issues for you and that last suggestion isn't working. ...   sorry but that is the way it is till I am done and I will not make it available until I am completely happy with it. :) 

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,

  Quote

but honestly think your setup is way to complex

Expand  

If you want some testing on a pretty much "vanilla" system, feel free to send me whatever you would like me to try out.

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/11/2022 at 8:32 AM, Melba23 said:

pretty much "vanilla" system,

Expand  

what this mean something like clean/standard system ?

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)
  On 7/11/2022 at 8:22 AM, Jos said:

Scratch that ...  As I said before: My current version is totally different from what you have, so just wait for me to be done with it and simply don't use it when it is causing issues for you and that last suggestion isn't working. ...   sorry but that is the way it is till I am done and I will not make it available until I am completely happy with it. :) 

Expand  

I just sent to you email:   "AutoItPortable_for_JOS__testing_LUA.zip - part 2"

I test it with:

#Region ; *** Dynamically added Include files ***
#include <File.au3>                                          ; (07/08/22 23:51:36
#include "c:\autoitportable\myincludeset\mlipok\ADO.au3"     ; (07/11/22 12:04:55
#include "c:\autoitportable\myincludeset\othermembers\WinHttp.au3" ; (07/11/22 12:05:00
#include "c:\autoitportable\myincludeset\othermembers\wd_core.au3" ; (07/11/22 12:05:06
#EndRegion ; *** Dynamically added Include files ***
#include "c:\AutoItPortable\MyIncludeSet\mlipok\ADO_API.au3"
#include "c:\AutoItPortable\MyIncludeSet\othermembers\wd_helper.au3"
#SciTE4AutoIt3_Include_Path=;c:\AutoItPortable\MyIncludeSet\mLipok;=;c:\AutoItPortable\MyIncludeSet\OtherMembers;c:\AutoItPortable\MyIncludeSet\Priv

_Example()

Func _Example()
    Local $aTemp = _FileListToArray(@ScriptDir, '*', $FLTA_FILES, False)
    _FileListToArray(

    _ArrayDisplay(

    _ADO_Execute(
    _ADO_Recordset_Load(
    $ADO_

    _WinHttpConnect(
    $WINHTTP_

    _WD_CreateSession(

    _ADO_API(

    $_WD_ERROR_
EndFunc   ;==>_Example

 

And I wonder why this following line are added:

#include "c:\autoitportable\myincludeset\mlipok\ADO.au3"     ; (07/11/22 12:04:55
#include "c:\autoitportable\myincludeset\othermembers\WinHttp.au3" ; (07/11/22 12:05:00
#include "c:\autoitportable\myincludeset\othermembers\wd_core.au3" ; (07/11/22 12:05:06

when they are already referenced by:

#include "c:\AutoItPortable\MyIncludeSet\mlipok\ADO_API.au3"
#include "c:\AutoItPortable\MyIncludeSet\othermembers\wd_helper.au3"

 

 

 

To make it easier I create a small reproducer: Public.zip

The main.au3 contains:

#SciTE4AutoIt3_Include_Path=;c:\AutoItPortable\Example\Public\MyIncludeSet
#include "c:\AutoItPortable\Example\Public\MyIncludeSet\1.au3"

_Function_2()

1.au3 contains:

#include-once
#include "c:\AutoItPortable\Example\Public\MyIncludeSet\2.au3"

Func _Function_1()

EndFunc   ;==>_Function_1

2.au3 contains:
 

#include-once

Func _Function_2()

EndFunc   ;==>_Function_2

 

My question is as follows:    Why dynamic scripts add the following lines, despite the fact that this file already has an appropriate / required reference.

#Region ; *** Dynamically added Include files ***
#include "c:\autoitportable\example\public\myincludeset\2.au3" ; (07/11/22 12:18:10
#EndRegion ; *** Dynamically added Include files ***

 

 

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 7/11/2022 at 10:22 AM, mLipok said:

And I wonder why this following line are added:

#include "c:\autoitportable\myincludeset\mlipok\ADO.au3"     ; (07/11/22 12:04:55
#include "c:\autoitportable\myincludeset\othermembers\WinHttp.au3" ; (07/11/22 12:05:00
#include "c:\autoitportable\myincludeset\othermembers\wd_core.au3" ; (07/11/22 12:05:06

when they are already referenced by:

#include "c:\AutoItPortable\MyIncludeSet\mlipok\ADO_API.au3"
#include "c:\AutoItPortable\MyIncludeSet\othermembers\wd_helper.au3"

-snip-

 

Expand  

Please please pretty please: Stop asking these questions about the "old" version you have... I am NOT going to spent any more time on these questions in either answering or investigating... this is what I have already stated and hopefully now have used better/clearer wording!  ..  and when the new release is available: i will still not answer them unless I get at least the log that goes with the question!...  This is just so I keep my sanity ! ;)  

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

mLipok,

  Quote

what this mean something like clean/standard system ?

Expand  

Yup. Standard AutoIt install with all the non-standard additional UDFs that I use in a single separate folder.

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 (edited)
  On 7/11/2022 at 11:38 AM, Jos said:

Please please pretty please: Stop asking these questions about the "old" version you have..

Expand  

Oh sorry, I download current LUA.zip and I was thinking this is your current version, now I understand that you have some new on your desk, but stil as work in progress.
So I will wait till I be able to test your new version and till you request new logs.

 

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)

Thanks ! ;) 

by the way: I have already answered this question too, so why do you think the answer would be different this time? 

  On 7/11/2022 at 10:22 AM, mLipok said:

My question is as follows:    Why dynamic scripts add the following lines, despite the fact that this file already has an appropriate / required reference.

Expand  

my previous answer:

.. so if it's not clear what I wrote then ask as it is important you understand how things work when testing to avoid going around in circles.
So to rephrase: Dynamic includes only goes one level deep, which means it reads all files in an #include statement in the master source and gets the available UDFs & Global Vars from it, but it doesn't read any included files! I have done this deliberately to keep things clean and avoid a messy setup.
The other consideration is speed as this would mean a whole lot more io each time the current script is saved or check for include is done.
Doesn't it make perfect sense to:

#include "c:\autoitportable\example\public\myincludeset\2.au3" ; (07/11/22 12:18:10

 when you refer to a "standard user udf" with the name _Function_2() ? To me it makes total sense to want that and not depend on any intermediate include file(s) and keep code much cleaner/logical.... or am I the only one thinking this?

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

Posted
  On 7/11/2022 at 1:32 PM, Jos said:

or am I the only one thinking this?

Expand  

I'm just throwing my point of view.
As no one else has commented on my point of view yet, so we have to wait for what time will bring.
The answer will come over time as this feature becomes publicly available.

 

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

The answer will come over time as this feature becomes publicly available.

Expand  

...  That is not the way it will work as I am not planning to keep on spending a shitload of time on changing this one again, then I rather kill it now and we pretend it never existed.   ( and I simply keep it for myself as a user lua option, as it save me time when doing a quick simple script)  

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,

My 2p worth.

I think the functionality of auto-including UDFs when typing a script is a fantastic idea - I was delighted with the way it was working in the last released iteration where it met all my expectations. I agree totally with your philosophy of keeping the logic of the whole process as simple as possible:

  Quote

Dynamic includes only goes one level deep, which means it reads all files in an #include statement in the master source and gets the available UDFs & Global Vars from it, but it doesn't read any included files! I have done this deliberately to keep things clean and avoid a messy setup.
The other consideration is speed as this would mean a whole lot more io each time the current script is saved or check for include is done.

Expand  

This seems to me to be a perfectly reasonable way of proceeding and in my "simple" setup I do not foresee any big problems - if I have to manually add a couple of includes from time to time (such as when I have a modified version of one of my UDFs in @ScriptDir) then so be it.

  Quote

then I rather kill it now and we pretend it never existed.

Expand  

Please do not do this - I am very much looking forward to testing your " new and improved" version sometime soon. There will always be outlier cases where users, for whatever reason, have "complicated" setups (Michal, I am looking at you!) - but that is as personal choice and they should not complain too much if the tool is not perfect for them.

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

 

  • 3 weeks later...
  • Developers
Posted (edited)

It has been a while since I posted in here, but I have been revamping the internals and adding functionality onto the previously shown base logic. It is all working faster and the AutoComplete has become "smarter". This Video-gif shows how it works currently in my test environment. It now includes partial Variable names/UDFnames sorted on position typed word found, and also includes matching defined abbreviations, which will expand upon selection: 

AutoComplete1.gif

 

..  will be continued...

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

  • Jos changed the title to SciTE lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs
Posted

Nice addition for showing expanded abbreviations during typing.

image.png.262f6c5a8fa5ff0f0bc364d644aa4191.png

 

image.thumb.png.23c2f203dd833bc1f497ea1246a3f7c1.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

  • Moderators
Posted

Jos,

After a lot more testing I would ask for just one change:

When selecting from the autocomplete box with the Enter key I would prefer that there was not a "New Line" passed to SciTE. Under the old system when we were only really dealing with Keywords it made sense, but nowadays the autocomplete is more likely to be in the middle of a line and I would prefer it to just enter the selection without a automatic new line. You could then differentiate between using the Tab key (which adds a space after the selected item) and the Enter key which does not.

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

 

  • Developers
Posted (edited)
  On 7/30/2022 at 11:25 AM, Melba23 said:

You could then differentiate between using the Tab key (which adds a space after the selected item) and the Enter key which does not.

Expand  

Not sure about what you mean with this last sentence as I thought that this is what is happening at this moment already. When you are in the middle of a line typing something end you select the keyword from the DropDown with Tab, it should just add the selected text with a space...right?    

EDIT: mmm rereading and thinking about it a little more I guess you want the Tab to add the selected text with a space and the Enter simply inserting the selected text....right?

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,

Yup!

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

 

  • Developers
Posted

I like to keep this flexible for now so added 2 properties where we can define the additional character for Tab and Enter on Keywords:

# 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=\s

Just use the latest zip file and add these to your SciTEUser.properties and adjust as you prefer, in your case remove the \n on the first one. :) 

Curious what others prefer so we can make a decision what the best default is.

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,

Looks like you read my mind - I hesitated to suggest options because of the extra work it would make for you! Danke je wel.

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

As so far I was too busy to take a look.
Will check in comming days.

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