Jump to content

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


Recommended Posts

  • Developers
Posted
  On 7/29/2022 at 9:43 AM, Jos said:

Updated the first post with this major upgrade/changed version for all to have a go and let me know whether things work for you. 

Expand  

Due to the overwhelming responses of the many testers of this new version, I am forced to postpone the release of the next version of the SciTE4AutoIt3 installer to Christmas next year. Thank you for your understanding. 

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

Hi,

Next year = 2023 ?

The situation is deseperated ...

You will have a lot of vacation to go skiing ...

Cheers

 

Posted

I'm testing now ! 
😃

 

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)

My proposal is:

if I start typing with $ then it should popup only variable and const, but not functions and not abbreviatons

Currently it acts like follows:

image.png.529b2dac01ba14c98f4349571e24e31a.png

 

EDIT:
and also
When start typing without $ at the start it should popup only functions and abbreviations, but not variables and const

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 (edited)

i see that I can use following directive directly in script

#SciTE4AutoIt3_Dynamic_Include_Path=

 

but I do not see setting for this path in SciTEUser.properties

Is there a way to do this ?

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

Why by default 

  Quote

autocomplete.au3.disable=0 

Expand  

?

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

which takes precedence
A directive from a script or a setting from SciTEUser.properties

  Quote

#SciTE4AutoIt3_Dynamic_Include_whiletyping=y                   ;dynamic.include.whiletyping=y/n

Expand  

?

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)

finally awesome :)

image.png.909e5cf2b7b4679679cdf1ee32070d3c.png

image.png.3bd5b5c3c11e89240a37e1e47dd57c61.png

 

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

@Jos I hope you have my C:\AutoItPortable\MyIncludeSet\ environment

#Region ; *** Dynamically added Include files ***
#EndRegion ; *** Dynamically added Include files ***
#include "C:\AutoItPortable\MyIncludeSet\othermembers\wd_helper.au3"
#include "C:\AutoItPortable\MyIncludeSet\mlipok\ADO_API.au3"
#include "C:\AutoItPortable\MyIncludeSet\mlipok\QuickPDF.au3"
#SciTE4AutoIt3_Dynamic_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(

    $_WD_ERROR_
EndFunc   ;==>_Example

 

I have issue that expanding $ADO_ERR_..... and $_WD_ERROR_.... works but expanding $QPDF_ERR_.... not works.
Can you check why ?

 

 

btw.
to test new stuf  I had to change
#SciTE4AutoIt3_Include_Path
to
#SciTE4AutoIt3_Dynamic_Include_Path

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 8/9/2022 at 8:54 AM, mLipok said:

I'm testing now ! 
😃

 

Expand  

Thanks

  On 8/9/2022 at 8:58 AM, mLipok said:

My proposal is:

if I start typing with $ then it should popup only variable and const, but not functions and not abbreviatons

Currently it acts like follows:

image.png.529b2dac01ba14c98f4349571e24e31a.png

 

EDIT:
and also
When start typing without $ at the start it should popup only functions and abbreviations, but not variables and const

Expand  

As Always need a way to replicate what you see as that doesn't happen for me in my "simple test scripts".

  On 8/9/2022 at 9:08 AM, mLipok said:

i see that I can use following directive directly in script

#SciTE4AutoIt3_Dynamic_Include_Path=

 

but I do not see setting for this path in SciTEUser.properties

Is there a way to do this ?

Expand  

Nope as I would assume that all  your standard "UDF Includes" are part of the Registry settings and this directive was made to deviate/add some autoComplete for a specific project.

 

  On 8/9/2022 at 9:13 AM, mLipok said:

which takes precedence
A directive from a script or a setting from SciTEUser.properties

?

Expand  

What do you think ?   Don't ALL directives override the defaults per definition? ;)

 

  On 8/9/2022 at 9:42 AM, mLipok said:

have issue that expanding $ADO_ERR_..... and $_WD_ERROR_.... works but expanding $QPDF_ERR_.... not works.
Can you check why ?

Expand  

Will Check and come back to it.

  On 8/9/2022 at 9:42 AM, mLipok said:

btw.
to test new stuf  I had to change
#SciTE4AutoIt3_Include_Path
to
#SciTE4AutoIt3_Dynamic_Include_Path

Expand  

Correct as the Documentation and the au3.properties tell you to do. ;)  I Have do some renaming for consistence and assume people read the docs.

 

By the the way: I thought we had agree you wouldn't be "firing your questions from the hip" anymore and only do one at a time...  what happened? (Don't answer here!)  ;) 

 

Don't forget to also test with this setting you your Master.au3 example and nested includes! ;)

#SciTE4AutoIt3_Dynamic_Include_recursive_check=n
#SciTE4AutoIt3_Dynamic_Include_recursive_check=y

Thanks for your input!

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

  • Developers
Posted
  On 8/9/2022 at 9:42 AM, mLipok said:

I have issue that expanding $ADO_ERR_..... and $_WD_ERROR_.... works but expanding $QPDF_ERR_.... not works.
Can you check why ?

Expand  

mmm that's is quite simple: The Docs say: The same will happen when you use one of the Global Const variables

... and your file contains:

Const Enum _ ; UDF @Error Lists
        $QPDF_ERR_SUCCESS = 0, _
        $QPDF_ERR_GENERAL, _ ;1
        $QPDF_ERR_DLLFILENOTEXIST, _ ;2
        $QPDF_ERR_DLLINIT, _ ;3
        $QPDF_ERR_OBJCREATE, _ ;4

.. so it is not a Global Const and will not be read. When I add Global in front of it things work fine. 😎  

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

but the $ADO_ERR_.... and $_WD_ERROR_.... are defined the same way

Global Enum _
        $ADO_ERR_SUCCESS, _ ;               No Error
        $ADO_ERR_GENERAL, _ ;               General - some not classified type of Error
        $ADO_ERR_COMERROR, _ ;              COM Error - check your COM Error Handler
        $ADO_ERR_COMHANDLER, _ ;            COM Error Handler Registration
        $ADO_ERR_CONNECTION, _ ;            $oConection.Open    - Opening error
        $ADO_ERR_ISNOTOBJECT, _ ;           Function Parameters error - Expected/Required Object
        $ADO_ERR_ISCLOSEDOBJECT, _ ;        Object state error - Expected/Required state is $ADO_adStateOpen - but currently is $ADO_adStateClosed
        $ADO_ERR_ISNOTREADYOBJECT, _ ;      Object state error - Expected/Required state is $ADO_adStateOpen - but currently is $ADO_adStateConnecting or $ADO_adStateExecuting or $ADO_adStateFetching
        $ADO_ERR_INVALIDOBJECTTYPE, _ ;     Function Parameters error - Expected/Required different Object Type
        $ADO_ERR_INVALIDPARAMETERTYPE, _ ;  Function Parameters error - Invalid Variable type passed to the function
        $ADO_ERR_INVALIDPARAMETERVALUE, _ ; Function Parameters error - Invalid value passed to the function
        $ADO_ERR_INVALIDARRAY, _ ;          Function Parameters error - Invalid Recordset Array
        $ADO_ERR_RECORDSETEMPTY, _ ;        The Recordset is Empty - this not always mean error but in this case will not be returned any data
        $ADO_ERR_NOCURRENTRECORD, _ ;       The Recordset has no current record - but in this case will not be returned any data
        $ADO_ERR_ENUMCOUNTER ;------------- just for testing
Global Enum _
        $_WD_ERROR_Success = 0, _ ; No error
        $_WD_ERROR_GeneralError, _ ; General error
        $_WD_ERROR_SocketError, _ ; No socket
        $_WD_ERROR_InvalidDataType, _ ; Invalid data type (IP, URL, Port ...)
        $_WD_ERROR_InvalidValue, _ ; Invalid value in function-call
        $_WD_ERROR_InvalidArgue, _ ; Invalid argument in function-call
        $_WD_ERROR_SendRecv, _ ; Send / Recv Error
        $_WD_ERROR_Timeout, _ ; Connection / Send / Recv timeout
        $_WD_ERROR_NoMatch, _ ; No match for _WDAction-find/search _WDGetElement...
        $_WD_ERROR_RetValue, _ ; Error echo from Repl e.g. _WDAction("fullscreen","true") <> "true"
        $_WD_ERROR_Exception, _ ; Exception from web driver
        $_WD_ERROR_InvalidExpression, _ ; Invalid expression in XPath query, CSSSelector query or RegEx
        $_WD_ERROR_NoAlert, _ ; No alert present when calling _WD_Alert
        $_WD_ERROR_NotFound, _ ; File or registry key not found
        $_WD_ERROR_ElementIssue, _ ; Problem interacting with element (click intercepted, etc)
        $_WD_ERROR_SessionInvalid, _ ; Invalid session ID was submitted to webdriver
        $_WD_ERROR_UnknownCommand, _ ; Unknown command submitted to webdriver
        $_WD_ERROR_UserAbort, _ ; In case when user abort when @error occurs and $_WD_ERROR_MSGBOX was set
        $_WD_ERROR_FileIssue, _ ; Errors related to WebDriver EXE File
        $_WD_ERROR_NotSupported, _ ; When user try to use unsupported browser or capability
        $_WD_ERROR_AlreadyDefined, _ ; Capability previously defined
        $_WD_ERROR_Javascript, _ ; Javascript error
        $_WD_ERROR_COUNTER ; Defines row count for $aWD_ERROR_DESC

 

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

sorry my fault I see.

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 8/9/2022 at 10:26 AM, Jos said:

No...  

Expand  

yes I saw my fault

 

  On 8/9/2022 at 10:22 AM, mLipok said:

sorry my fault I see.

Expand  

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 8/9/2022 at 10:02 AM, Jos said:

As Always need a way to replicate what you see as that doesn't happen for me in my "simple test scripts".

Expand  

email "AutoItPortable_for_JOS__testing_LUA.zip - part 3" sent.

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

I get this when I follow your steps: image.png.fa8d765d6e91301007f47f5c80c3992b.png

... and do not see any UDFs

  On 8/9/2022 at 8:58 AM, mLipok said:

EDIT:
and also
When start typing without $ at the start it should popup only functions and abbreviations, but not variables and const

Expand  

Not sure that "it should" is a proper statement here, but what it actually does when yout start typing with a character is show all the possible UDFs/Functions/Abbrevs and any file variables containing those characters.

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 8/9/2022 at 11:02 AM, Jos said:

Not sure that "it should" is a proper statement here, but what it actually does when yout start typing with a character is show all the possible UDFs/Functions/Abbrevs and any file variables containing those characters.

Expand  

Ok.

  On 8/9/2022 at 11:02 AM, Jos said:

I get this when I follow your steps: ... and do not see any UDFs

Expand  

Please try to scroll down the list

image.png.26af163201a4f554abb0265aadc60882.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)

Yep ... I now understand what is happening....   any "current file" word without a $ prefix that matches will be shown in the $ dropwdown list. Will have a look.
Will be fixed in the next version, so it will only show Variables names when the typed word is prefixed with a $.

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

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