Jump to content

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


Recommended Posts

Posted (edited)

There is also other issue.
using:
https://github.com/Danp2/au3WebDriver

  1. open wd_helper.au3
  2. find any __WD_Error(
  3. try to jump into  __WD_Error()
     

In console you will see:

Quote

 -> cursor not on a Variable or UDF.

It should jump to the coresponding line in wd_core.au3 file

https://github.com/Danp2/au3WebDriver/blob/860eeb4e6a451465aeba7664686fe3adcbb803d8/wd_core.au3#L1656

 

For this reason I would like to add something like this:

#SciTE4AutoIt3_AutoItAutocomplete_Internal=__WD_*

 

to all of this files:
https://github.com/Danp2/au3WebDriver/blob/master/wd_cdp.au3
https://github.com/Danp2/au3WebDriver/blob/master/wd_capabilities.au3
https://github.com/Danp2/au3WebDriver/blob/master/wd_helper.au3

 

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:

Spoiler

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

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Posted (edited)

Hi Jos,

I'm not sure if this is something you can fix, or if it is an internal issue with Scite. But I noticed undoing a backspace action that was performed with multiple selections undoes the last move one line at a time (per press of ctrl+z), instead of undoing the last action for all the selections at once.

BackSpace.gif.171ebf51678812c16ed94e1fba297dc1.gif

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

 

  • Developers
Posted (edited)

I only see that behavior when the multiselect was disabled and needed to reselect the multicarret locations. Anything before will then be a single removal on Ctrl+z
So what was the exact sequence for the shown images?

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 1/4/2024 at 10:06 AM, mLipok said:

There is also other issue.
using:
https://github.com/Danp2/au3WebDriver

  1. open wd_helper.au3
  2. find any __WD_Error(
  3. try to jump into  __WD_Error()
     

In console you will see:

It should jump to the coresponding line in wd_core.au3 file

https://github.com/Danp2/au3WebDriver/blob/860eeb4e6a451465aeba7664686fe3adcbb803d8/wd_core.au3#L1656

 

For this reason I would like to add something like this:

#SciTE4AutoIt3_AutoItAutocomplete_Internal=__WD_*

 

to all of this files:
https://github.com/Danp2/au3WebDriver/blob/master/wd_cdp.au3
https://github.com/Danp2/au3WebDriver/blob/master/wd_capabilities.au3
https://github.com/Danp2/au3WebDriver/blob/master/wd_helper.au3

 

@JosHave you tried or even considered any tweaks?

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:

Spoiler

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

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

  • Developers
Posted
On 1/4/2024 at 10:06 AM, mLipok said:

It should jump to the coresponding line in wd_core.au3 file

The starting point is that any UDF starting with 2  underscores is considered an internal UDF and will not be colored/recognised unless it exists in the same file.
This means that the FAST search using the tables will work in wdcore.au3, but not in any other file, even when there is an include.
Having said that, I agree it should then try to old "long route" which opens the current included files and check for the UDF, which indeed wasn't working correctly.
That last part is fixed in the latest version included in the ZIP.

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 (edited)
5 hours ago, Jos said:

So what was the exact sequence for the shown images

In the Images, I have previously (for demonstration), typed abcd using MultiSelect, then backspaced "D" and "C", using Multiselect. I then pressed "Ctrl+z", which loses my multiselect, and undoes only one backspacing of "c".

Edited by Jos
corrected my quoted typo

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

 

Posted (edited)
2 hours ago, donnyh13 said:

corrected my quoted typo

Very tricky Jos! :)

I have another question.

For Call tips, is there a way to word wrap them if they extend too far (in my case off of the screen)? I tried inserting a "_" continuation in the params, but CallTips doesn't recognize those, and just joins it anyway.

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

 

  • Developers
Posted

I have the impression that the ctrl+z behavior is buildin as there is no check for that anywhere in the scripts.

As to your second question: didn't you ask that before and also posted it on the official SciTE group? 

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 (edited)
1 hour ago, Jos said:

no check for that anywhere in the scripts

Okay. Thanks for checking. That's what I thought too, as I couldn't find you doing anything with backspace other than in one spot. (For Includes I think)

1 hour ago, Jos said:

didn't you ask that before and also posted it on the official SciTE group

Maybe? I don't remember asking that before here. And no, I have never posted on the official Scite group before.

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

 

Posted

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

 

  • Developers
Posted (edited)

Correct... and just found the name in a PM with the question about the max length from him. .... so memory was correct, just to wrong name associated with it .  🤔wonder why that is... ;) 

but the answer could be that you will have the re-write all API files and adapt the length of the text appearing on the second line.
A process I believe could be to perform these steps :

  • Read all current API files.
  • Determine the correct max length for the text, insert the \n and write it to a new file.
  • Update the settings to use only this one api file.

Some of it is already there in the current dynamic stuff ....

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

wonder why that is

Because we've harassed you for the past several months? 😳

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

 

Posted (edited)
14 minutes ago, Jos said:

A process I believe could be to perform these steps

Okay. Thank you.

Are the API files rewritten per Scite opening? Or per tab switch?

 

14 minutes ago, Jos said:

Determine the correct max length

Could also do a general max length, and have a user setting to adjust it. But that could be a pain with various window positioning.

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

 

  • Developers
Posted

The standard supplied api files stay as they are, but are read at the start to determine the delta with everything found. All other found usfs are saved in different apu files dynamically by the lua code.

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
10 minutes ago, donnyh13 said:

Because we've harassed you for the past several months? 😳

No worries,  I appreciate the feedback from you all as that is part of the motivation to keep pushing this to a real production version one day! So thanks for the "harassing". 

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

All other found udfs are saved in different api files dynamically by the lua code

And I assume also Scite is pre-coded (by you?) to look for and read these files directly, correct? Or is there a inbetween process so Scite gets the User UDF call tip info.

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

 

  • Developers
Posted (edited)

Standard SciTE functionality is that the files defined in au3.properties for the *.au3  extension are read:

# List of all AutoComplete API files used
api.$(au3)=$(SciteDefaultHome)\api\au3.api;$(SciteDefaultHome)\api\au3.autoit3wrapper.api;$(SciteUserHome)\au3.std.dynamic.calltips.api;$(SciteUserHome)\au3.file.dynamic.calltips.api;$(SciteUserHome)\au3.usr.dynamic.calltips.api;$(SciteUserHome)\au3.user.calltips.api
# List of all AutoComplete API files used
api.$(au3)=
$(SciteDefaultHome)\api\au3.api;                ### Is installed/updated by the AutoIt3 Installer with the standard UDF's, directives, functions
$(SciteDefaultHome)\api\au3.autoit3wrapper.api; ### Is installed/updated by the SciTE4AutoIt3 Installer with the SciTE Directives
$(SciteUserHome)\au3.std.dynamic.calltips.api;  ### Dynamic process generated
$(SciteUserHome)\au3.file.dynamic.calltips.api; ### Dynamic process generated
$(SciteUserHome)\au3.usr.dynamic.calltips.api;  ### Dynamic process generated
$(SciteUserHome)\au3.user.calltips.api          ### Hardcoded User Calltips as defined in the Helpfile, SciTEConfig addon.

So the process would have to override this setting to point to another file which is created as previously defined, so SciTE will only look at that.

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

So thanks for the "harassing"

No problem. Thanks for your amazing additions, and problem solving. This is turning out great!

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

 

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