-
Posts
5,760 -
Joined
-
Last visited
-
Days Won
196
argumentum last won the day on March 1
argumentum had the most liked content!
About argumentum

- Currently Viewing Forums Index
Profile Information
-
Member Title
✨Universalist ✨
-
Location
I'm in your browser now =)
-
WWW
https://www.youtube.com/watch?v=SjwX-zMRxO0&t=5s
-
Interests
Relax
Recent Profile Visitors
argumentum's Achievements
-
argumentum reacted to a post in a topic:
WinRT - UI Gallery (Xaml Islands)
-
How to access list view elements?
argumentum replied to MulliGun's topic in AutoIt General Help and Support
..looks Delphi like ( the coding language ). Where can I get the sprite utility to look at it and give it a try ? -
argumentum reacted to a post in a topic:
3D Maze Ball (AutoIt3 + C)
-
argumentum reacted to a post in a topic:
Custom Dialogs/Modals
-
donnyh13 reacted to a post in a topic:
Help File/Documentation Issues. (Discussion Only)
-
Help File/Documentation Issues. (Discussion Only)
argumentum replied to guinness's topic in AutoIt Technical Discussion
..to be or not to be.. As the well read and organized coder that I am ( or aim to be ) I read the WiKi. Add button(s) with $idRun, and $idCancel to have $idCntrlName = ... Then I run the script and I get "error: $idCancel previously declared as a 'Const'." and I open the offending file and I read: ... Global Const $MB_SERVICE_NOTIFICATION = 0x00200000 ; The caller is a service notifying the user of an event. Global Const $MB_RIGHTJUSTIFIED = $MB_RIGHT ; Do not use, see $MB_RIGHT. Included for backwards compatibility. ; Indicates the button selected in the message box Global Const $IDTIMEOUT = -1 ; The message box timed out Global Const $IDOK = 1 ; OK button was selected Global Const $IDCANCEL = 2 ; Cancel button was selected ... ... I found it, "funny" ? 🤷♂️ -
argumentum reacted to a post in a topic:
Custom Dialogs/Modals
-
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
..the missing 16 is the "case else". It should not brake anything. Edit: my bad: " Case Default ; 16" should be case else -
Help File/Documentation Issues. (Discussion Only)
argumentum replied to guinness's topic in AutoIt Technical Discussion
; SQLite3 dll version must match #include <MsgBoxConstants.au3> #include <SQLite.au3> #include <SQLite.dll.au3> Global $sSQliteDll = _SQLite_Startup() If @error Then If MsgBox($MB_SYSTEMMODAL + $MB_YESNO + $MB_DEFBUTTON2, "SQLite Error", (@AutoItX64 ? 'SQLite3_x64.dll' : 'SQLite3.dll') & " Can't be Loaded!" & @CRLF & @CRLF & _ "Not FOUND in @ScriptDir, @WorkingDir," & @CRLF & @TAB & "@LocalAppDataDir\AutoIt v3\SQLite," & @CRLF & @TAB & "@SystemDir or @WindowsDir" & _ @CRLF & @CRLF & "Would you like to go to the site to download it ?") = $IDYES Then ShellExecute("https://www.sqlite.org/download.html") Exit 4 EndIf MsgBox($MB_SYSTEMMODAL, (@AutoItX64 ? 'SQLite3_x64.dll' : 'SQLite3.dll') & " Loaded", $sSQliteDll & " (v" & _SQLite_LibVersion() & ")") ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF) _SQLite_Shutdown() This "Example 1" will be better than the current one. If the DLL is not there it takes you to the site for download. -
..and, it will all go in a SQLite DB. And the files will be compressed. And since am at it, why not reinvent the wheel 🤔 ..and so I did. FileEncoding and CRC check in a custom header to validate it all, and recreate the file as if it was reading the file itself. Posting mostly to say: "am still working on it"
-
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
I don't want anything. Am Zen. But is good for you to understand the trend of thought when coding. That was my aim when I posted "Lets look at ..." -
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
Is better to see it crappy in case of the "impossible failure" than not serve anything. -
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
Lets look at "Func _CheckedPNG($bSaveBinary = False, $sSavePath = @ScriptDir, $iSize = 16)" $iSize will always be needed, so that will go as the 1st parameter. $bSaveBinary is false without a $sSavePath so, if "$sSavePath = Default" there is no saving by default. If you do pass a parameter then is because you want to use it, to save the resource to disk. ;~ Func _CheckedPNG($bSaveBinary = False, $sSavePath = @ScriptDir, $iSize = 16) Func _CheckedPNG($iSize = 16, $sSavePath = Default) Local $Base64String, $iExt = (IsKeyword($sSavePath) ? 0 : 2) ; "BitAND(@extended, 2)" meant that the user wanted to save to disk Switch $iSize Case 13 $Base64String &= 'iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IB2cksfwAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAAd0SU1FB+oDAxcYOepp4t4AAADpSURBVCjPY2RgYGAwSG9o0IrMz2fjFRBgwAF+ff7w4c7mBQtO9RYWMpuVTJigm1BezszOwcGABzCzc3CI6lpYMDAwMDBGHXj/Hp8N2GxkIkUDAwMDAxuvgAATMQrvbF6Awieo6Uh9AgMDIyNuTY8ObMDQIGHqyKDiE49b06/PHxiONCTi1cDAwMDAgsxR8U1gYGBgYFjjq8hgkN6AVQMDAwMDY8LZ//+xBCsDGy/uQGX69fnDByzBijeemJnZODgkTBwciI2nm2tnzGB+cfbgQTZeAQF+BQ0NfEnp1+cPHy4v6Og4O6WyEgBYG0pIgbNupgAAAABJRU5ErkJggg==' Case 20 $Base64String &= 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IB2cksfwAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAAd0SU1FB+oDAxcZJn563moAAAEdSURBVDjLY2RgYFDilVZUs66f3yqkpq/GxivA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/QFK5WU5W6lWowvxOPgk0YV4XMhJktGj1ERFzGO2+bbZdPs+meX+ev90ddXoU8oAADzePjjwKwYAIJZIJrO71SoAQGRpJZPZfNdsQgByVsrlmFS+WISARMCFAsOtebs8TxJOxJhhlxEKCojlEWL8XAzuKw4MBCwhKASFoBAUghzNoK3C520JukSZ6v+PvIY5K+VgNNRh0G6BgCX/7tA45mfD6d8jZ8VknlUgU9rxJ8hOjOsguzGuguaBcQ00L8zUoKv9F/BGjID6uuIpzNQg86GnHu5OhJo3ZmrQ+isFYonkRCgnMFODllYy8OTw/MEopzAzFYWHopzEzFzl/odyGgMAEJEbd3e2l+HSDgg5yXGMbaD7ULFE0nGMrQ9W6/FzA2P7m4IV5TTG1iM3HqNHwehT4ETs+GvVXDpWlkfA8ij8phCCQpAfQaOhrgcFMxrqOmOdxPBzjB6ljFYnJCggrUEI0yUnJ0EBdU5rNUZrEKI1/L9L3XNFGbRVNXCjMVFz4fb7zY2AJcmPoMu9cln7cnEBMDaN' $Base64String &= 'NWirqtG/vuZEjP0ykTUa6vrlXrnc+VCrmWtRS5Omfv14dMTyCHl9Zk6rE/Lp+caGuTO/2od/9DaZVL5Y5ESMWd4jI5o9SrUGIV2iKFrjd4iZH07DnAm7lTVAAAAAAElFTkSuQmCC' Case Default ; 16 If $iSize <> 16 Then $iExt = BitOR($iExt, 1) ; to let them know that the resource was not found, but you're not going to brake the GUI $Base64String &= 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IB2cksfwAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAAd0SU1FB+oDAxcZFLatj+oAAAEPSURBVDjLY2RgYGDQiioo0IrKz+eRVFBgIAK8u3XhwrWlEybc2bJwIaOKb0KCTcP8+QxkgFO9hYWMfsvPnxdSMzAgx4Avzx48YEw4+/8/AwWAiYFCQJIBdzYvYPj1+QN5BlyY2cBwbdlEBjZeAdINuDCzgeHRgY0MHrP24/fCl2cPGNb4KjJ8ef4Aq2Z02zEM4JFSYDBIq2fYkebI8OX5A4KaGRgYGFjQBVR8ExgYGBgYNkUaMvBIKuDVzMDAwIAzHby7eYGBR0oBr2asLoABIXXiEifTl+cPHpCbiN7dvHCBmYGBkVHaysODHAPOTq6oYH59+cSJL88fPuSRVFDgFJGQIDYTXZjZ0HBz3cyZABhkZ7hwets3AAAAAElFTkSuQmCC' EndSwitch Local $bString = _WinAPI_Base64Decode($Base64String) If @error Then Return SetError(1, $iExt, 0) $bString = Binary($bString) If Not $iExt Then Local Const $hFile = FileOpen($sSavePath & "\checked.png", $FO_BINARY + $FO_OVERWRITE) If @error Then Return SetError(2, $iExt, $bString) FileWrite($hFile, $bString) FileClose($hFile) EndIf Return SetError(0, $iExt, $bString) EndFunc ;==>_CheckedPNG and that approach will be less coding. "_CheckedPNG(False, @ScriptDir, $iSize)" will turn into "_CheckedPNG($iSize)" because defaults are there for how is meant, and the rest are options. Also, give them a default PNG even if they messed up, to not just brake the GUI because of a miscalculation on the size 🤔 The @extended also tells a story: BitAND(@extended, 1) is that the size was wrong. BitAND(@extended, 2) is that it was a save to disk. Since the default was not "save to disk", the fact of "If @extended then" is good enough. Do you like the idea -
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
..after 0.9.x.x, you can have 0.10.x.x . There is no hurry. Edit: looks good -
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
;~ #include "GUIDarkTheme.au3" ; default state of the _GUIDarkThemeDebug() function ConsoleWrite('+ $bDebug = ' & _GUIDarkThemeDebugOnOff(False, True) & @TAB & ' $bForceOnError = ' & Not Not @extended & @CRLF) Global $sRet = TheWayOfMyErrors(0, "No error, no default ""echo""") _GUIDarkThemeDebug($sRet & @CRLF) $sRet = TheWayOfMyErrors(1, "An error, default ""echo""") _GUIDarkThemeDebug($sRet & @CRLF) Func TheWayOfMyErrors($iError, $sText) Return SetError($iError, 0, $sText) EndFunc ;==>TheWayOfMyErrors Func _GUIDarkThemeDebugOnOff($bDebug = Default, $bForceOnError = Default) Local $iVal = _GUIDarkThemeDebug("", "", "", "", -30 - BitOR(($bDebug ? 1 : 0), ($bForceOnError ? 2 : 0))) Return SetError(0, (BitAND($iVal, 2) ? 1 : 0), Not Not BitAND($iVal, 1)) EndFunc ;==>_GUIDarkThemeDebugOnOff Func _GUIDarkThemeDebug($sStr, $sScript = '"GUIDarkTheme.au3"', $iErr = @error, $iExt = @extended, $iLine = @ScriptLineNumber) Local Static $bDebug = False, $bForceOnError = True If $iErr == "" And $iLine <= -30 Then $bDebug = Not Not BitAND(30 - $iLine, 1) $bForceOnError = Not Not BitAND(30 - $iLine, 2) Return BitOR(($bDebug ? 1 : 0), ($bForceOnError ? 2 : 0)) EndIf If ((Not $bDebug) And (Not $bForceOnError)) Then Return SetError($iErr, $iExt, 0) If ((Not $bDebug) And $bForceOnError And (Not $iErr)) Then Return SetError($iErr, $iExt, 0) Local $iRet = ConsoleWrite($sScript & '(' & $iLine & ') : ' & $iErr & '/' & $iExt & ' - ' & $sStr) Return SetError($iErr, $iExt, $iRet) EndFunc ;==>_GUIDarkThemeDebug ...now with Bitwise power (r)(tm) -
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
the line "ElseIf $bTrueFalse Then ; ForceOnError ON" was wrong. ;~ #include "GUIDarkTheme.au3" _GUIDarkThemeDebugOnOff(False, True) ; default state of the _GUIDarkThemeDebug() function Global $sRet = TheWayOfMyErrors(0, "No error, no default ""echo""") _GUIDarkThemeDebug($sRet & @CRLF) $sRet = TheWayOfMyErrors(1, "An error, default ""echo""") _GUIDarkThemeDebug($sRet & @CRLF) Func TheWayOfMyErrors($iError, $sText) Return SetError($iError, 0, $sText) EndFunc ;==>TheWayOfMyErrors Func _GUIDarkThemeDebugOnOff($bTrueFalse = Default, $bForceOnError = Default) Local $iExt = _GUIDarkThemeDebug("", "", 0, 0, -20) Local $iRet = _GUIDarkThemeDebug("", "", 0, 0, -10) If IsKeyword($bTrueFalse) Then ; return state ElseIf $bTrueFalse Then ; debug ON _GUIDarkThemeDebug("", "", 0, 0, -12) $iRet = True Else ; debug OFF _GUIDarkThemeDebug("", "", 0, 0, -11) $iRet = False EndIf If IsKeyword($bForceOnError) Then ; return state ElseIf $bForceOnError Then ; ForceOnError ON _GUIDarkThemeDebug("", "", 0, 0, -22) $iExt = 1 Else ; ForceOnError OFF _GUIDarkThemeDebug("", "", 0, 0, -21) $iExt = 0 EndIf Return SetError(0, $iExt, $iRet) ; Extended = $bForceOnError ; $iRet = $bDebug ; ; should I have used a bitwise operation 🤔 EndFunc ;==>_GUIDarkThemeDebugOnOff Func _GUIDarkThemeDebug($sStr, $sScript = '"GUIDarkTheme.au3"', $iErr = @error, $iExt = @extended, $iLine = @ScriptLineNumber) Local Static $bDebug = False, $bForceOnError = True Switch $iLine Case -10 Return $bDebug Case -11 $bDebug = False Return $bDebug Case -12 $bDebug = True Return $bDebug Case -20 Return $bForceOnError Case -21 $bForceOnError = False Return $bForceOnError Case -22 $bForceOnError = True Return $bForceOnError EndSwitch If ((Not $bDebug) And (Not $bForceOnError)) Then Return SetError($iErr, $iExt, 0) If ((Not $bDebug) And $bForceOnError And (Not $iErr)) Then Return SetError($iErr, $iExt, 0) Local $iRet = ConsoleWrite($sScript & '(' & $iLine & ') : ' & $iErr & '/' & $iExt & ' - ' & $sStr) Return SetError($iErr, $iExt, $iRet) EndFunc ;==>_GUIDarkThemeDebug P.S.: There is an "Alt-D" in SciTE too ( try it while the cursor in on a variable ). But I think this is better for general distribution. -
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
...debugging my bugs.. BRB -
WildByDesign reacted to a post in a topic:
DarkMode UDF for AutoIt's Win32GUIs
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
No way. 😁 I joke around but am mostly serious, in a not OMG! way If you took the time to understand what you're reading, then what is presented is functional. That debug thingy I gave you is to use everywhere but it can be annoying so by default will not consoleWrite unless !, you say "yes please show me" ( via _GUIDarkThemeDebugOnOff(1) ). So that when someone has a problem, the forum is not a chatter box of confusion because there was no proper debugging in place. So again, copy'n'paste is great, if you follow the code and understand what it does and how. And like JPM said: you are doing a fantastic Job. It looks good at 175% scale P.S.: Here are the functions as you thought it would be: < Removed the code. It was wrong. New fixed version here > that way it will not echo unless there is an error but you can choose either or with: #include "GUIDarkTheme.au3" _GUIDarkThemeDebugOnOff(False, True) ; default state of the _GUIDarkThemeDebug() function ... mic. drop 🎤 -
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
#EndRegion Enable GUI LIGHTMODE Func _GUIDarkThemeDebugOnOff($bTrueFalse = Default) If IsKeyword($bTrueFalse) Then ; return state Return _GUIDarkThemeDebug("", "", 0, 0, -10) ElseIf $bTrueFalse Then ; debug ON Return _GUIDarkThemeDebug("", "", 0, 0, -12) Else ; debug OFF Return _GUIDarkThemeDebug("", "", 0, 0, -11) EndIf EndFunc ;==>_GUIDarkThemeDebugOnOff Func _GUIDarkThemeDebug($sStr, $sScript = '"GUIDarkTheme.au3"', $iErr = @error, $iExt = @extended, $iLine = @ScriptLineNumber) Local Static $bDebug = False Switch $iLine Case -10 Return $bDebug Case -11 $bDebug = False Return $bDebug Case -12 $bDebug = True Return $bDebug EndSwitch If Not $bDebug Then Return SetError($iErr, $iExt, 0) Local $iRet = ConsoleWrite($sScript & '(' & $iLine & ') : ' & $iErr & '/' & $iExt & ' - ' & $sStr) Return SetError($iErr, $iExt, $iRet) EndFunc ;==>_GUIDarkThemeDebug This goes at the bottom of your UDF And this in you test script ... ; this must be set after DPI #include "GUIDarkTheme.au3" ;~ _GUIDarkThemeDebugOnOff(True) ... ..and that way you can ask users to test and return the console reading by uncommenting one line: "GUIDarkTheme.au3"(1888) : 2/0 - $iDPI = 0 "GUIDarkTheme.au3"(1858) : 2/0 - $iDPI = 0 And there you'll see an @error = 2 from the prior line. ..or continue sharpening your graphics using Bas64 😒 -
DarkMode UDF for AutoIt's Win32GUIs
argumentum replied to NoNameCode's topic in AutoIt Technical Discussion
... $iDPI = __WinAPI_GetDpiForWindow($hGUI) ConsoleWrite('"GUIDarkTheme.au3"(' & @ScriptLineNumber & ') : $iDPI = ' & $iDPI & @CRLF) Switch $iDPI Case 96 $iSize = 13 Case 120 $iSize = 16 Case 144, 168 $iSize = 20 ... "GUIDarkTheme.au3"(1888) : $iDPI = 0 "GUIDarkTheme.au3"(1858) : $iDPI = 0 $iSize = 16 ; this would need to stretch ...are you cheating 🤔