Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/17/2025 in all areas

  1. Well, this is openning a can of worms! Nowhere in the AutoIt specification of flags is mentionnend whether more than one occurence of a given flag is permitted or acted upon: is "%+++123.0f" the same as "%+123.0f". Seems easy to check in a few cases, but still without clear spec, we can't rely on that being innocuous. We do have a hint that more than one distinct flag is supported (albeit ignored) : If 0 and - appear, the 0 is ignored. the blank is ignored if both the blank and + flags appear. To provide a partial answer we need to test all combinations of flags. From "" to "-+*0#" (where * stands for a 0x20 whitespace for clarirty). Below is some code to do that and reveal that many flags combinations are not supported: ; There are 5 flag specifiers: '-', '+', '0', ' ', '#' in the StringFormat specification. ; If one assumes that a given flag may only appear once in the flags specification ; and given that more than one flag may be specified, the total numbers of flag strings ; is the power set of the set of flag specifiers. There are therefore 2^5 flag strings to ; test. ; This also assumes that the order of flags in a given flag string is irrelevant. ; ; It is easy to build that power set using binary mapping. Local $aFlags = ['-', '+', '0', ' ', '#'] Local $aFlagComb[2^5][2] Local $aComb2 For $i = 0 To 2^5 - 1 $aComb2 = StringSplit(StringFormat("%05s", _IntToString($i, 2)), "", $STR_NOCOUNT) For $j = 0 To 4 $aFlagComb[$i][0] &= ($aComb2[$j] = 1 ? $aFlags[$j] : "") Next Next For $i = 0 To UBound($aFlagComb) - 1 $aFlagComb[$i][1] = StringFormat("%" & $aFlagComb[$i][0] & "10.0f", 123) $aFlagComb[$i][0] = StringReplace($aFlagComb[$i][0], " ", "*") Next _ArrayDisplay($aFlagComb) Func _IntToString($i, $base = 16) Return DllCall("msvcrt.dll", "wstr:cdecl", "_i64tow", "int64", $i, "wstr", "", "int", $base)[0] EndFunc ;==>_IntToString It is also unclear whether the order of individual flags matter inside a given input. To fully answer this new question, one would need to create new entries in $FlagComb where the length of the flag string is > 1, split that string in individual characters and add new entries made from ArrayPermute. If you're cautious, also create new entries to cope with duplicate flags in various position(s) inside the flags strings to see if ever some rule emerges. Making a long answer short: both AI answers are incorrect. (My) conclusion: never trust a pile on unknown hardware fed with social networks toilet noises.
    1 point
  2. WildByDesign

    DwmColorBlurMica

    I just updated the first post with version 0.0.4. With this version, I changed the hotkey to WinKey+Esc as suggested by @argumentum. Now when you use the hotkey, it will undo the changes made: rounded corners will reset to default title bar will reset to default color border color will reset to default title bar backdrop material will also reset to default Note: The only thing that I don't think can be reset is the DwmExtendFrameIntoClientArea attribute.
    1 point
×
×
  • Create New...