Jump to content

Recommended Posts

Posted

Abbreviations not always works

for example "cw" works in first case but fail on second case:

 

image.png.9beb0abdfb58627d4f9e4c86e5804cda.png

 

cw
    If Not @compiled Then cw

 

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,

Sorry, but I can confirm this problem. All abbreviations (both standard and user) only seem to work at the margin and not in the middle of a line.

M23

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

Works well

image.png.5854a5f828495efa0b11499491425a51.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

Just uploaded another update SciLexer because I wanted to ensure subsequent #preprocessor or #specials aren't syntax colored as such, as you can only have one at the start of a line  eg:  old:

image.png.f7d94bc79174ecfb1d3fba042263b4e3.png

new:

image.png.26493e167c9b578d3d2a6cd41e7b07bb.png

 

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)

mmm  guess I goofed up and we have issues with the EXPAND again .....  checking...

Fixed in latest Beta.
... and also updated AutoItTools.lua as I noticed that the expansion didn't work correctly when type a abbrev in front of another text and then hitting the space. 

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

  • 3 weeks later...
Posted (edited)

I found new issue with folding:

#Region Func: _My_Own_func()
    
    #EndRegion Func

image.png.7973050118d1a99dd2c7233e4db510c1.png


it looks like the isue is related to "Func" in #EndRegion line.

@Jos could you take a look on 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

  • Developers
Posted
  On 4/22/2022 at 10:23 AM, mLipok said:

it looks like the isue is related to "Func" in #EndRegion line.

@Jos could you take a look on this?

Expand  

Yeap that is again one of those exceptions.  I've made several changes under the hood which should now also fix this one.
It also contains a fix for another minor issue with directive lines. :) 
It is available in the Beta directory.

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

  • 1 month later...
Posted (edited)

@Jos after long time of using new stuff I have some thoughts.

This following highlighting feature at first glance was awesome.

image.png.623ac95b21bdcc88e1727e95f588429d.png


But now I feel that it would be nice to have background highlighting on this part:

  Quote

#TODO:  Check if can be moved here this code =>

Expand  



The reason is that when I see background then I know that this is "comment like" and will be omnited in runtime.
Currently in a give example the background highlightment is to short/small and I often have trouble with properly reading code.

  Reveal hidden contents



Could you consider to change the highligting engine to add support for background highlighting to the requested part ?

 

ps.

Here is my testing script:

#TODO:  Check if can be moved here this code => _My_String_To_Number_To_String($aAdnotacja[$__g_eEPU__ADNOTACJA_EKK__Kwota])

 

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 5/25/2022 at 8:05 AM, mLipok said:

Could you consider to change the highligting engine to add support for background highlighting to the requested part ?

Expand  

This sounds like a "Michal Special" to me and not so much as an standard feature that will be used in general by the larger community. ;)
This part "#TODO:  Check if can be moved here this code" is considered AU3_preprocessor up till the "=" character after which standard lexing will be done.
I cannot see how this request justifies defining another type of SPECIAL to allow for a Font/Color differentiation for the "#TODO:.*=>" part.

...  but what happened to this reply I gave you on your earlier request? 

 

    

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 5/25/2022 at 8:38 AM, Jos said:

but what happened to this reply I gave you on your earlier request? 

Expand  

I missed this one. Will try take a look in comming weekend, currently I'm overworked.

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

Here is an adapted version that should be close to what you want: 

Cltrl+Alt+p toggles this On/Off:

639053362_Schermafbeelding2022-05-25115903.png.a277bec0ad6ca85e65d40e7d314b2ddd.png

This in SciTEUser.Properties:

command.name.49.*=Mark #ToDo's
command.49.*=Mark_Todo()
command.subsystem.49.*=3
command.mode.49.*=savebefore:no
command.shortcut.49.*=Ctrl+Alt+p

This is PersonalTools.lua:

--------------------------------------------------------------------------------
-- Mark #TODO: parts
--------------------------------------------------------------------------------
check_active = false
indicator = 3;

function Mark_Todo()
    --print(check_active)
    if (check_active ~= true) then
        check_active = true;
        find_specific_word("#TODO.*=>", SCFIND_WHOLEWORD+SCFIND_REGEXP)
    else
        check_active = false;
        clear_markers()
    end
end
--------------------------------------------------------------------------------
--
--------------------------------------------------------------------------------
function find_specific_word(word, fparams)
    -- print(word)
    -- Define what way to mark the found word
    scite.SendEditor(SCI_INDICSETSTYLE, indicator, INDIC_FULLBOX);
    scite.SendEditor(SCI_INDICSETFORE, indicator, 0x0000ff); -- (red)
    scite.SendEditor(SCI_INDICSETOUTLINEALPHA, indicator, 0xff); -- (red)
    scite.SendEditor(SCI_INDICSETALPHA, indicator, 0x30)
    -- Find first occurance
    s,e = editor:findtext(word, fparams, 0);
    while s do
        if (s ~= nil) then
            local line = editor:LineFromPosition(s);
            local line_contents = editor:GetLine(line);
            scite.SendEditor(SCI_SETINDICATORCURRENT, indicator);
            scite.SendEditor(SCI_INDICATORFILLRANGE, s, e - s)
        end
        -- Find next
        s,e = editor:findtext(word, fparams, e+1);
    end
end

--------------------------------------------------------------------------------
--
--------------------------------------------------------------------------------
function clear_markers()

    -- Clear the entire file
    scite.SendEditor(SCI_INDICATORCLEARRANGE, 0, editor.Length);
    s,e = editor:findtext("", SCFIND_REGEXP, 0);

end

 

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)

I was working on Au3WebDriver UDF, espescially on __WD_MessageCreator()
@Danp2
 made some changes and I notice that having such function:

Func __WD_MessageCreator($sFuncName, $sURL, ByRef Const $sResponseText, $sData = '')

the function header creator from SciTE4AutoIt3 create the header this way:

  Quote

; #INTERNAL_USE_ONLY# ===========================================================================================================
; Name ..........: __WD_MessageCreator
; Description ...: 
; Syntax ........: __WD_MessageCreator($sFuncName, $sURL, Const Byref $sResponseText[, $sData = ''])
; Parameters ....: $sFuncName           - a string value.
;                  $sURL                - a string value.
;                  $sResponseText       - [in/out and const] a string value.
;                  $sData               - [optional] a string value. Default is ''.
; Return values .: None
; Author ........: Your Name
; Modified ......: 
; Remarks .......: 
; Related .......: 
; Link ..........: 
; Example .......: No
; ===============================================================================================================================

Expand  

and here my questions arise.

My questions are realted to Syntax line.

  Quote

; Syntax ........: __WD_MessageCreator($sFuncName, $sURL, Const Byref $sResponseText[, $sData = ''])

Expand  

Question 1: why it is "Byref" instead "ByRef"

Question 2: why it creates it in revers order "Const Byref" instead "Byref Const"

Question 3: is it vary in any way for AutoIt I mean the reversed order "Const Byref" instead "Byref Const"

 

Thank you in advance for your response.
mLipok

 

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 5/31/2022 at 9:54 PM, mLipok said:

Question 1: why it is "Byref" instead "ByRef"    (Fixed in Beta)

Question 2: why it creates it in revers order "Const Byref" instead "Byref Const"

Question 3: is it vary in any way for AutoIt I mean the reversed order "Const Byref" instead "Byref Const"

Expand  

"No idea" on all. ;)  I didn't create this LUA function, just included it at the time and probably missed some update somewhere?
You can find the history somewhere in the forum. 
... but as you also have seen in the helpfile, it  states for 2 & 3 so sequence seems to be correct?.:

  Quote

Func functioname ( [Const] [ByRef] $param1, ..., [Const] [ByRef] $paramN, $optionalpar1 = value, ...)
...
[Return [value]]
EndFunc

Expand  

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

"No idea" on all. ;)  I didn't create this LUA function, just included it at the time and probably missed some update somewhere?

Expand  

Can you take a look and fix this issue with inproper capitalization?

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

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

Sorry, but again "no idea" what/why/who updated that as I wasn't behind my laptop at that time this morning...   deleted the file as it doesn't need to be in this directory.

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

Posted

From here --

  Quote

Declaring parameters as both ByRef and Const is useful when the large original variable must remain unchanged as AutoIt will return an error if the function attempts to alter it inadvertantly. The order of the keywords is not important, as long as they are both in front of the parameter they modify.

Expand  

P.S. Looks like "inadvertantly" is spelled incorrectly above.

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