Jump to content

mLipok

MVPs
  • Posts

    12,067
  • Joined

  • Last visited

  • Days Won

    70

mLipok last won the day on September 26

mLipok had the most liked content!

About mLipok

  • Birthday 07/19/1978

Profile Information

  • Member Title
    Sometimes... even usually I'm nitpicky.
  • Location
    Europe, Poland, Upper Silesia, Zabrze
  • Interests
    ¯\_(ツ)_/¯

Recent Profile Visitors

33,318 profile views

mLipok's Achievements

  1. to all interested in: https://github.com/WinMerge/winmerge/pull/3685
  2. There was some one ... I had a deperesion in the past few years so I stoped to be so nitpicky ... and became more friendly.
  3. btw. As I said: I was checking the lexer for WinMerge. Naturally (for me whent it comes with C++), I used AI (ChatGPT) for this and asked it to prepare some test .au3 scripts. Interestingly, I first discovered the bug in WinMerge, and only then did I compare it with SciTE.
  4. I do not need. People are simply prone to making mistakes, and a stray letter can easily end up in the code. for example: #comments-startcomment for the CS CE block of comment #cs Extra #ce Extra #comments-end Extra instead: #comments-start comment for the CS CE block of comment #cs Extra #ce Extra #comments-end Extra I thought everything was here:
  5. yeah I know: and yes I'm nitpicky ... usually.
  6. hmm... in this following case also Au3Check work not coherent with AutoIt3.exe If True Then ConsoleWrite(1 & @CRLF) #csExtra3 If True Then ConsoleWrite(2 & @CRLF) dfadfafdadf #ceExtra3 If True Then ConsoleWrite(3 & @CRLF) Au3Check results: AutoIt3.exe results:
  7. also tidy works kinda weired: before TIDY: #csExtra1 ConsoleWrite('First test' & @CRLF) #ceExtra1 #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra2 #ceExtra2 #comments-endless If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. after TIDY: #csExtra1 ConsoleWrite('First test' & @CRLF) #ceExtra1 #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra2 #ceExtra2 #comments-end Extra2 If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Extra2 Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. I mean: change #comments-endless into: #comments-end  Extra2
  8. currently I work on: https://github.com/WinMerge/winmerge/pull/3685 and I notice that this snippets seams to be wrongly highlighted: #csExtra ConsoleWrite('First test' & @CRLF) #ceExtra #Region Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. ; Regression: mixed case is valid; longer names below must NOT close or open blocks. #CoMmEnTs-StArT #csExtra #ceExtra #comments-endless If True Then ConsoleWrite("Still a comment after prefix lookalikes." & @CRLF) EndIf #CoMmEnTs-EnD Global $afterMixedCaseDirective = 2 #EndRegion Rozpoznaje dyrektywy komentarzy bez względu na wielkość liter i sprawdza granicę ich nazw. by SciTE4Au3 I mean line #1 open comment block and line #3 end comment block also line #10 ends comments blocks but Lexer does'nt change the coloring properly as a AutoIt3.exe restults I get: Which means first ConsoleWrite is ommited and second ConsoleWrite is executed, which you wouldn't expect from code visualization in SciTE.
  9. What you mean here ?
  10. It shouldn't. It would be a different story if you removed `sleep()` entirely.
  11. Why sleep(100) ? put there 10.
  12. modfied: #include-once ; #INDEX# ======================================================================================================================= ; Title .........: CmdLine ; AutoIt Version : 3.3 ; Description ...: Reads named arguments, positional values and grouped letter flags from $CmdLine. ; Author(s) .....: Jefrey ; Remarks .......: Function headers added with AI assistance: OpenAI GPT-6 ; Dll ...........: None ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_CmdLine_Get ;_CmdLine_KeyExists ;_CmdLine_ValueExists ;_CmdLine_FlagEnabled ;_CmdLine_FlagDisabled ;_CmdLine_FlagExists ;_CmdLine_GetValByIndex ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ;_CmdLine__FlagContains ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_Get ; Description ...: Gets the argument following a named command-line key. ; Syntax ........: _CmdLine_Get($sKey[, $mDefault = Null]) ; Parameters ....: $sKey - Key name without its /, - or -- prefix. ; $mDefault - [optional] Value returned when the key has no following argument; default is Null. ; Return values .: The next command-line argument when the key has one; otherwise $mDefault. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: The next argument is returned literally, even if it starts with a key prefix. key=value syntax is unsupported. ; Related .......: _CmdLine_KeyExists, _CmdLine_GetValByIndex ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_Get("color", "white") ; =============================================================================================================================== Func _CmdLine_Get($sKey, $mDefault = Null) For $i = 1 To $CmdLine[0] If $CmdLine[$i] = "/" & $sKey Or $CmdLine[$i] = "-" & $sKey Or $CmdLine[$i] = "--" & $sKey Then If $CmdLine[0] >= $i + 1 Then Return $CmdLine[$i + 1] EndIf EndIf Next Return $mDefault EndFunc ;==>_CmdLine_Get ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_KeyExists ; Description ...: Checks whether a named key occurs on the command line. ; Syntax ........: _CmdLine_KeyExists($sKey) ; Parameters ....: $sKey - Key name without its /, - or -- prefix. ; Return values .: True if the key occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: An argument value after the key is not required. ; Related .......: _CmdLine_Get, _CmdLine_ValueExists ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_KeyExists("verbose") ; =============================================================================================================================== Func _CmdLine_KeyExists($sKey) For $i = 1 To $CmdLine[0] If $CmdLine[$i] = "/" & $sKey Or $CmdLine[$i] = "-" & $sKey Or $CmdLine[$i] = "--" & $sKey Then Return True EndIf Next Return False EndFunc ;==>_CmdLine_KeyExists ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_ValueExists ; Description ...: Checks whether an argument exactly matches a value. ; Syntax ........: _CmdLine_ValueExists($sValue) ; Parameters ....: $sValue - Value to find among the command-line arguments. ; Return values .: True if the value occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: This searches every argument and does not associate a value with a key. ; Related .......: _CmdLine_KeyExists ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_ValueExists("white") ; =============================================================================================================================== Func _CmdLine_ValueExists($sValue) For $i = 1 To $CmdLine[0] If $CmdLine[$i] = $sValue Then Return True EndIf Next Return False EndFunc ;==>_CmdLine_ValueExists ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_FlagEnabled ; Description ...: Checks whether a letter flag occurs in a + flag group. ; Syntax ........: _CmdLine_FlagEnabled($sKey) ; Parameters ....: $sKey - One or more letters to find together in a flag group. ; Return values .: True if a matching + group occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: Matching is case-sensitive and requires an entire argument of the form +LETTERS. ; Related .......: _CmdLine_FlagDisabled, _CmdLine_FlagExists ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_FlagEnabled("C") ; matches +CB ; =============================================================================================================================== Func _CmdLine_FlagEnabled($sKey) Return _CmdLine__FlagContains($sKey, "+") EndFunc ;==>_CmdLine_FlagEnabled ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_FlagDisabled ; Description ...: Checks whether a letter flag occurs in a - flag group. ; Syntax ........: _CmdLine_FlagDisabled($sKey) ; Parameters ....: $sKey - One or more letters to find together in a flag group. ; Return values .: True if a matching - group occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: Matching is case-sensitive and requires an entire argument of the form -LETTERS. ; Related .......: _CmdLine_FlagEnabled, _CmdLine_FlagExists ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_FlagDisabled("V") ; matches -VW ; =============================================================================================================================== Func _CmdLine_FlagDisabled($sKey) Return _CmdLine__FlagContains($sKey, "-") EndFunc ;==>_CmdLine_FlagDisabled ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_FlagExists ; Description ...: Checks whether a letter flag occurs in a + or - flag group. ; Syntax ........: _CmdLine_FlagExists($sKey) ; Parameters ....: $sKey - One or more letters to find together in a flag group. ; Return values .: True if a matching group occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: Matching is case-sensitive and requires an entire argument of the form +LETTERS or -LETTERS. ; Related .......: _CmdLine_FlagEnabled, _CmdLine_FlagDisabled ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_FlagExists("B") ; =============================================================================================================================== Func _CmdLine_FlagExists($sKey) Return _CmdLine__FlagContains($sKey, "+") Or _CmdLine__FlagContains($sKey, "-") EndFunc ;==>_CmdLine_FlagExists ; #FUNCTION# ==================================================================================================================== ; Name ..........: _CmdLine_GetValByIndex ; Description ...: Gets a command-line argument by its one-based index. ; Syntax ........: _CmdLine_GetValByIndex($iIndex[, $mDefault = Null]) ; Parameters ....: $iIndex - Integer index from 1 through $CmdLine[0]. ; $mDefault - [optional] Value returned for an invalid or absent index; default is Null. ; Return values .: The indexed argument when it exists; otherwise $mDefault. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: Index 0 contains the argument count and is not returned by this function. ; Related .......: _CmdLine_Get ; Link ..........: https://www.autoitscript.com/forum/topic/169610-cmdline-udf-get-valueexistenceflag/ ; Example .......: _CmdLine_GetValByIndex(1, "missing") ; =============================================================================================================================== Func _CmdLine_GetValByIndex($iIndex, $mDefault = Null) If Not IsInt($iIndex) Or $iIndex < 1 Or $iIndex > $CmdLine[0] Then Return $mDefault Return $CmdLine[$iIndex] EndFunc ;==>_CmdLine_GetValByIndex ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: _CmdLine__FlagContains ; Description ...: Checks for literal letters inside one signed flag-group argument. ; Syntax ........: _CmdLine__FlagContains($sKey, $sPrefix) ; Parameters ....: $sKey - One or more letters to find together. ; $sPrefix - Expected leading + or - character. ; Return values .: True if a matching group occurs; otherwise False. ; Author ........: Jefrey ; Modified ......: ; Remarks .......: Rejects empty and non-letter keys so they cannot act as regular expressions. ; Related .......: _CmdLine_FlagEnabled, _CmdLine_FlagDisabled, _CmdLine_FlagExists ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _CmdLine__FlagContains($sKey, $sPrefix) If Not StringRegExp($sKey, "^[A-Za-z]+$") Then Return False For $i = 1 To $CmdLine[0] Local $sArgument = $CmdLine[$i] If StringLeft($sArgument, 1) <> $sPrefix Then ContinueLoop Local $sFlags = StringTrimLeft($sArgument, 1) If StringRegExp($sFlags, "^[A-Za-z]+$") And StringInStr($sFlags, $sKey, 1) Then Return True Next Return False EndFunc ;==>_CmdLine__FlagContains
  13. New release on https://github.com/mlipok/AcrobatReader.au3-UDF/releases/tag/2.1.0 (just refactoring, clean up and documentation)
  14. Hello every body in this conversation. I encourage you to read more here:
×
×
  • Create New...