Jump to content

argumentum

MVPs
  • Posts

    5,747
  • Joined

  • Last visited

  • Days Won

    196

argumentum last won the day on March 1

argumentum had the most liked content!

7 Followers

About argumentum

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

14,580 profile views

argumentum's Achievements

  1. ;~ #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)
  2. 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.
  3. ...debugging my bugs.. BRB
  4. 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 🎤
  5. #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 😒
  6. ... $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 🤔
  7. 5120x2160 175% Edit: same at 200% Edit, again: looks good at 125% Solution? : Change the scale on your monitor to see and verify that it can go as far as you can test.
  8. ..then is not a forum solution that you need but a bug report. And is better that you doit yourself because I'll never use that language and you can do a follow up on it
  9. the files does have a duplicate function name, but that is not the problem for you. Your problem is how it looks in the console no displaying the characters in your SciTE editor that is not even from this site, right ? Ok, so the redirect also gives the ?? instead of the characters. No clue 🤷‍♂️
  10. What is base64 to you ?
  11. can you remove the $TVS_CHECKBOXES style ( forcefully on the fly ) since the UDF is faking it ?
  12. Making something work with the latest is nice but, it should work with anything, anywhere. So make sure that it'd work even if the font is not in that PC. Maybe embed the font in the resources ( examples are everywhere ).
  13. ...not sure this chunk of GDI+ serves the intermediate need, but here it goes: ..so, maybe we don't need to have external resources 🤔
  14. $GUI_CHECKED (1) = checked.ico = Radio, Checkbox, MenuItem or ListViewItem will be checked. $GUI_INDETERMINATE (2) = ???????? = Checkbox having the tristate attribute will be greyed. $GUI_UNCHECKED (4) = unchecked.ico = Radio, Checkbox, MenuItem or ListViewItem will be unchecked. The indeterminate.ico is needed ... #Region CHECKBOX ; Global Const $BS_AUTO3STATE = 0x0006 _HiDpi_GUICtrlCreateCheckbox("Checkbox", 130, 335, 80, 20, 0x0006) GUICtrlSetTip(-1, '#Region CHECKBOX') ;~ GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetState(-1, $GUI_INDETERMINATE) #EndRegion CHECKBOX ...
×
×
  • Create New...