Jump to content

mLipok

MVPs
  • Posts

    12,053
  • 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

32,897 profile views

mLipok's Achievements

  1. 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
  2. New release on https://github.com/mlipok/AcrobatReader.au3-UDF/releases/tag/2.1.0 (just refactoring, clean up and documentation)
  3. Hello every body in this conversation. I encourage you to read more here:
  4. New release on https://github.com/mlipok/AcrobatReader.au3-UDF ps. ChatGPT AI (Codex) helped a lot to fix all my issues I have before with this UDF. Opening post changed.
  5. I feel this way:
  6. If you calculate it based on the time saved, I’d say it’s equivalent to a month’s worth of work as a programmer without AI. Unless you’re writing bad prompts—in which case, it’s several times a day (this time in terms of actual clock time).
  7. I have big 2 projects writen entirly with AI one with C# one with AutoIt Both really big working on it about 1 month Have many integrations btw. recently 2 udfs posted by me here on the forum are also created with AI and next will come soon
  8. With ChatGPT codex this is taken automaticaly. With chatty I put : And then I start to co-work with AI
  9. What kind of AI you are using ? I currently use ChatGPT for simple chat and with CODEX variant.
  10. my global AGENTS.md is about 15k and for one of my new project 54k But I even have specific rules for coloring and GUI positioning.
  11. AutoIt Registration-Free COM Manifest Tools A small set of AutoIt utilities for creating, testing, and merging Windows Registration-Free COM manifests. The project is intended to simplify working with native COM DLLs that normally require system registration through regsvr32.exe. FULL INFO: LINKS: https://github.com/mlipok/ManifestManagement.au3 https://github.com/mlipok/ManifestManagement.au3/blob/main/ManifestManagement.au3
  12. Markdown.au3 — an AutoIt UDF for converting Markdown text to RTF. It supports headings, bold and italic text, lists, blockquotes, links, code blocks, and other common Markdown elements. It also provides _MarkdownToRTF_MsgBox(), an enhanced MsgBox()-style dialog that displays formatted Markdown content as RTF. Markdown_Example.au3 — demonstrates Markdown → RTF conversion, displaying the result in a RichEdit control, example AutoIt, SQL, and JavaScript code blocks, and the use of _MarkdownToRTF_MsgBox(). Markdown.zip
  13. @bladem2003 thanks for pointing me in this direction
×
×
  • Create New...