Jump to content

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


Recommended Posts

Posted

I was afraid that it will hard thinking how you can check such situation.

I will not argue if you think it is too difficult

Good luck

JP

  • Developers
Posted

Ok... here is the current issue I have with properly identifying whether it is a Script defined Variable or a Standard used Variable:

Local $FO_OVERWRITE                                 ; is local definition
Local $FO_ANSI = 1 + 1, $FO_OVERWRITE               ; is local definition
Local $hOut = 25 + $FO_OVERWRITE                    ; Standard Global Variable
Local $hOut = FileOpen("temp.au3", $FO_OVERWRITE)   ; Standard Global Variable

I have been playing with regex tests but have failed till now to properly identify the third line correctly being a usage of the global variable.
So I am leaning toward not making it more complex and let au3check do its job by telling you you have a duplicate Variable defined. 

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)

Correct

...   but ....  I think I am close to making this work anyways with some magic LUA coding logic. 

it will even BUG-YOU-LIKE-HELL that you are locally defining an variable defined in a standard Include:

- (old)line 9 defines Local Variable: $FO_OVERWRITE which is also defined in Standard UDF file:C:\Program Files (x86)\AutoIt3\include\fileconstants.au3
-                                            ... and also defined in Project  UDF file:D:\Users\jvdza\Downloads\test2.au3


Will try to make something available soon  for you to test with.  

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

Can we avoid  the yellow output lines?

What is strange is that not all the lines are displayed, for instance line 13 is also defined in the standard UDF

Cheers

Screenshot - 09_12_2022 , 00_59_45.png

  • Developers
Posted (edited)
41 minutes ago, jpm said:

Can we avoid  the yellow output lines?

The better question is: Do we want to avoid the yellow lines as they are there for a reason. ;) 
I think we should force them always ....   but one option could be that when the filenames are the same we skip them assuming they are a copy.

Not sure why that one line isn't triggering an warning, would have to check when I can replicate it.

 

I made an update earlier to also skip any Project directory potential includes when they don't contain #include-once. So no $Vars or Funcs are available from project AU3 files unless they contain #include-once.

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

I just use the version 9/12/2022 11:17 and I get the same

it could be cool to have the "AddLuaIncludes" version as the result of the execution in the output pane

Screenshot - 09_12_2022 , 13_12_20.png

Posted

I was thinking that if we have in a script a local installation refered with

#AutoIt3Wrapper_AutoIt3Dir=E:\trunk.SVN.prev\install

the Ctrl+Shift+z ("addIncludeLua" execution) it will use the refered includes

but it do not it is referring the standard autoit installation or perhaps the one  defined in the .properties

Can I expect the #AutoIt3Wrapper_AutoIt3Dir working iwith Ctrl+Shift+z?

Cheers

 

  • Developers
Posted
3 hours ago, jpm said:

#AutoIt3Wrapper_AutoIt3Dir=E:\trunk.SVN.prev\install

the Ctrl+Shift+z ("addIncludeLua" execution) it will use the refered includes

Are you using a portable setup or Installed version of AutoIt3?    The LUA script will read the Registry settings as AutoIt3 does.

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)
14 hours ago, jpm said:

another anomaly

at the first execution of "addLuaInclude"I only get One include added

Doesn't happen for me...   result on first execution :

+ 11:22:55 _WinAPI_IsWow64Process => Add include:<WinAPIInternals.au3>
+ 11:22:55 _MemFree => Add include:<Memory.au3>
> Added 2 include(s) at top of the script.

Second:

> done, no includes to add.

 

Do you also have a simple snipped for the other issue in stead of a screen capture so I can replicate that one as well? :) 
Thanks

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
22 hours ago, jpm said:

it could be cool to have the "AddLuaIncludes" version as the result of the execution in the output pane

Not sure what you mean with this remark.....sorry.

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

Are you using a portable setup or Installed version of AutoIt3?    The LUA script will read the Registry settings as AutoIt3 does.

I have made a change in the common.lua file which will now use this logic:

  1. Use {SciTE_Home}\..\include as the AutoIt3 program directory as default
  2. Override previous with path defined in #AutoIt3Wrapper_AutoIt3Dir when present
  3. Override previous with path defined in #AutoIt3Wrapper_AutoIt3 when present  

Will be in the next upload soon. 

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

Are you using a portable setup or Installed version of AutoIt3?    The LUA script will read the Registry settings as AutoIt3 does.

I am using the installed updated with the SciTE_changes_Dynamic_Includes.zip

Posted
5 hours ago, Jos said:

Do you also have a simple snipped for the other issue in stead of a screen capture so I can replicate that one as well?

I use use the INcluded file GUICtrlInternals.au3, the file being in an include standard dir (not the standard one e:\trunk.SVN.prev\install)

In fact if the file as no includes I need to execute Ctrl+shif+z twice to get the 2

If i on do the includes(Ctrl-Z)  to be as the initial value (without includes) the next Ctrl-Shift-z will introduce the 2 includes !!!

 

Posted
5 hours ago, Jos said:

Not sure what you mean with this remark.....sorry.

> done, no includes to add. (lua version 09/12/2022 11:17)

so I Will be sure I am using a specific version of the dynamin include lua

Posted

another problem I don't if it is related to my environment (e:\trunk.SVN.prev\install)

but if you try to have to include after removing all includes from GUIAvi.au3 with Ctl-Shift-z

you don't get GUICtrlInternals.au3

the file are listed with <...> but it should be "..." as they are in the same dir

Screenshot - 10_12_2022 , 17_31_56.png

GuiAVI.au3

  • Developers
Posted

What happens when you first do an Save for the the after you done the Ctrl+Z  and the do the Ctl-Shift-z?
I will do some testing to see if I can replicate this behavior.

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

after the first save i get only one include.

I did a try changing the GuiCtrlInternals.au3  without the includes in Program files (x86) an I get the same behavior Just one include  by Ctl-shift-z

more I am wondering why if I change the SciteUser.properperties with autoit3testdir=E:\trunk.SVN.prev\install

the tbl is referring .Dyn_*s_C_Program_Files_(x86)_AutoIt3_include.tbl not to E:\trunk.SVN.prev\install

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