Leaderboard
Popular Content
Showing content with the highest reputation on 05/14/2025 in all areas
-
GUI Button Responsiveness Drops After Setting Color or Background Color
ioa747 and one other reacted to pixelsearch for a topic
Hello @TitaniusPlatinum I had the same concern a few weeks ago, in this post . Here is a part of the comment : Melba23's code indicates the way to handle this. May I suggest yöu save his code on your computer. I kept his useful code about a month ago, saving it under a catchy name '"Double-click a label (WM_COMMAND).au3" Good luck2 points -
Melque_Lima, There is a very useful search function at top-right of the page. A quick search found several solutions. M232 points
-
Thank you, I did a search, but didn't search hard enough obviously. That got me sorted out again!1 point
-
Have you tried the version in the Wiki? It was last edited by @BugFix in July 2024.1 point
-
SciTE AI assistant
argumentum reacted to ioa747 for a topic
basic changes: I changed the Timeouts, to WinHttp.WinHttpRequest.5.1 , because it ended unexpectedly, in larger models ; ResolveTimeout: 5 sec ; ConnectTimeout: 10 sec ; SendTimeout: 30 sec ; ReceiveTimeout: 120 sec I added an additional Unescape, because some models return it like this ; Unescape \u00XX characters $sString = StringReplace($sString, '\u003c', '<', 0, 1) $sString = StringReplace($sString, '\u003e', '>', 0, 1) I expanded Unescape to Json_EscapeString($sAssistant) Json_EscapeString($sSystem)1 point -
Overwrite a file without destroying the previous contents
TheSaint reacted to tebasuna51 for a topic
Code used: $fh = FileOpen($wav_file, 17) ; $FO_APPEND (1) + $FO_BINARY (16) = 17 FileSetPos($fh, $pos_mask, 0) ; $FILE_BEGIN (0) = Beginning of the file. FileWrite($fh, number($mask,1)) ; $NUMBER_32BIT (1) = 32bit integer (to be sure always 4 bytes) FileClose($fh)1 point -
Overwrite a file without destroying the previous contents
TheDcoder reacted to tebasuna51 for a topic
Thanks all. Since my file isn't a text file, I need to open it as $FO_APPEND+$FO_BINARY. If it opens as a text file by default, writing adds an unwanted extra chr(15) (?). I use this to change the channel mask (4 bytes) of a wav file (maybe larger than 10 GB). Rewriting the entire file takes time and space.1 point -
Win 11 - My own border color ( Help area )
Musashi reacted to argumentum for a topic
These border colors are set by the app every time the window is created. The example for this is already posted. Since this is more of an app than an example, I opened a thread here for support. The script and compilation to .exe is the files area for download. According to Microsoft, the possibility to set the border color is available from Windows 11 Build 22000 onwards.1 point -
Win 11 - My own border color ( Help area )
argumentum reacted to WildByDesign for a topic
I had some fun with your script after learning some more about how it works. Added title bar Dark, Mica, Acrylic/blur, Mica Alt options Added ability to do rounded GUI corners or standard square corners * These are build 22621+. I'm still playing with some more fun options. I understand that your script is related to border color, however, your script really is the perfect "vehicle" to enable all of these fun things system-wide. Func SetBorderColor_apply2this($hwnd, $iBorderColor = $g_iBorderColor) ; 0xffFFFFFF default ; else 0x00ABCDEF ; https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute ; $DWMWA_BORDER_COLOR = 34 ; https://www.purebasic.fr/english/viewtopic.php?t=78732 _WinAPI_DwmSetWindowAttribute__($hWnd, 20, 1) ; dark mode DWMWA_USE_IMMERSIVE_DARK_MODE _WinAPI_DwmSetWindowAttribute__($hWnd, 38, 4) ; build 22523+, DWMWA_SYSTEMBACKDROP_TYPE = 38 ; 0 auto, 1 none (dark), 2 mica, 3 acrylic, 4 mica alt _WinAPI_DwmSetWindowAttribute__($hWnd, 33, 1) ; DWMWA_CORNER_PREFERENCE = 33 ; 0 default, 1 not round, 2 round, 3 round small _WinAPI_DwmSetWindowAttribute__($hwnd, 34, _WinAPI_SwitchColor($iBorderColor)) ; border EndFunc ;==>SetBorderColor_apply2this EDIT: The DWMWA_SYSTEMBACKDROP_TYPE option will mess up the Start menu. You can avoid that easily by adding exclusion for any window with title "Start".1 point -
DarkMode UDF for AutoIt's Win32GUIs
argumentum reacted to UEZ for a topic
Is there a way to check if visible GUI is in dark mode? Edit: this seems to work: ;Coded by UEZ build 2025-05-14 #include <AutoItConstants.au3> #include <StringConstants.au3> #include <WinAPISysWin.au3> Const $DWMWA_USE_IMMERSIVE_DARK_MODE = @OSBuild < 18362 ? 19 : 20 Func _WinAPI_IsWindowDarkMode($hWnd) Local $value = DllStructCreate("int dm") Local $ret = DllCall("dwmapi.dll", "long", "DwmGetWindowAttribute","hwnd", $hWnd, "uint", $DWMWA_USE_IMMERSIVE_DARK_MODE, "struct*", $value, "uint", DllStructGetSize($value)) If @error Or $ret[0] <> 0 Then Return 0 Return $value.dm <> 0 EndFunc Global $aWinList = WinList(), $i, $iStatus For $i = 1 To $aWinList[0][0] If _WinAPI_IsWindowVisible($aWinList[$i][1]) Then If IsHWnd($aWinList[$i][1]) Then $iStatus = _WinAPI_IsWindowDarkMode($aWinList[$i][1]) ConsoleWrite($aWinList[$i][1] & ": " & $iStatus & " -> " & StringRegExpReplace($aWinList[$i][0], "[\r\n]+", "") & @CRLF) EndIf EndIf Next1 point -
DarkMode UDF for AutoIt's Win32GUIs
ioa747 reacted to WildByDesign for a topic
One thing that bothered me for a while was how regular checkboxes would get the dark theme but ListView checkboxes ($LVS_EX_CHECKBOXES) would not and it would be a significant contrast. This is not a limitation of AutoIt but actually a limitation of Windows dark mode Aero theme. Before, regular checkboxes would be in dark mode and listview checkboxes would be in light mode. I have attached the dark mode checkboxes to this post and each ICO file contains all sizes (13, 16, 20, 26, 32, 40, 52 pixels). All you need is the following code after dark mode has been applied: If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hListView, 2) _GUIImageList_Remove($hImageList) _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") EndIf Alternatively, you can add the icons as resources for compiled binaries like this: #AutoIt3Wrapper_Res_Icon_Add=unchecked.ico #AutoIt3Wrapper_Res_Icon_Add=checked.ico ; this part must be applied AFTER dark mode has already been set If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hListView, 2) _GUIImageList_Remove($hImageList) If @Compiled = 0 Then _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") Else _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 3) _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 4) EndIf EndIf Screenshot: DarkModeCheckboxes.zip1 point