Jump to content

Recommended Posts

Posted
1 hour ago, bladem2003 said:

"Fixed a potential struct-related lockup in the tab subclass procedure - thanks to argumentum"
Can you explain that in more detail?

..ok, I will. 
Using dot notation works fine, unless it doesn't. So I took the one messing up and changed it to use DllStructGetData() 
`Func _WinAPI_GetWindowRectAsArray($hWnd)`  fixed that.

I haven't had the clock up problem after that change. If you still have problems, like always, give us a reproducer script, so we can share your pain :D  

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted
2 hours ago, bladem2003 said:

Can you explain that in more detail? I'm using tabs, and sometimes the entire GUI freezes.

I don’t quite understand the DllStruct stuff very much. But I see that argumentum has just responded about it.

The GUI freezing was a result of the tab subclass locking up the process. This is fixed in the new version today.

2 hours ago, bladem2003 said:

What's strange is that other windows are also affected, for example, the Explorer window is completely black, and the text only appears when you hover the mouse over it.

Could this be related to the struct mentioned above?

This is my fault. I was briefly trying to use SetSysColors function for the white menubar line. Unfortunately, it affects all running apps and it was a bad decision of mine.

In the new version, there are no system wide changes. I went back to painting the white line the original way and found ways to do it more efficiently.

So this problem is fixed now too.

Posted

GUIDarkTheme 2026.07.10

  • Added dark theme for ChooseColor and ChooseFont dialog boxes
    • Added "..Color()" and "..Font()" to Demo.au3 GUI example - thanks to argumentum
    • Some areas of the ChooseFont dialog are still light due to CBS_OWNERDRAWFIXED *
  • Updated internal functions: __GUIDarkMenu_WM_WINDOWPOSCHANGED() and __GUIDarkMenu_PaintWhiteLine()
    • Both functions updated for better performance and reliability
  • Passing Parent/Owner handle to _ChooseColor(), _ChooseFont() or MsgBox() will center dialog on GUI

Latest download available in the first post of the topic. :)

 

@argumentum and I did something pretty neat with this release that Microsoft should have done. If you pass the Parent/Owner handle in the parameters, it will center the dialog box on your GUI window instead of the desktop which makes more sense.

For example:

Quote

_ChooseColor(2, 0xFF7700, 2, $Form1)
_ChooseFont("Arial", 8, Default, 0, False, False, False, $Form1)
MsgBox(BitOR($MB_TOPMOST, $MB_OK), "About", $sMsg, 0, $Form1)

If you do not pass the Parent/Owner handle, it would normally do its default positioning. MsgBox is generally centered on desktop. ChooseColor usually shows in the top left corner of the desktop. And ChooseFont seems to show up wherever it wants.

But we fixed that too. If Parent/Owner handle is not passed, those dialogs show up perfectly centered based on the desktop size. If you do pass Parent/Owner handle, then the dialogs show up perfectly centered on your GUI based on your GUI size and position.

Posted

GUIDarkTheme 2026.07.11

  • Smooth resizing of Demo.au3 GUI
  • Static (label) control color handling improvements
  • Minor improvements to ChooseColor dialog
  • Fixed issue with tab item icons/images not showing
  • Fixed issue where splitbutton dropdown arrow would sometimes disappear
  • Removed the ability to set custom tab control background color
    • Too much complexity and potential performance impact

Latest download available in the first post of the topic. :)

Lots of important fixes in this release. Especially for anyone who uses icons/images on the tabs of a tab control.

But most importantly, I've added smooth (...like butter!) resizing of the GUI in the Demo.au3 script. Try it. It's quite mesmerizing. The normal AutoIt GUI resizing method absolutely hammers the CPU when you have many controls like this Demo does. So I have reduced that CPU usage during GUI resize down to almost nothing. 🤩

Posted

GUIDarkTheme 2026.07.15

  • Added missing colors for Slider/TrackBar disabled state
  • Improvements to tab control icon/text alignment
  • Added border to SysMonthCal32 control
  • Added support for standalone Scrollbar window with SBS_SIZEBOX or SBS_SIZEGRIP
    • Control Viewer is an example with sizegrip/sizebox but no actual statusbar
  • Improved the contrast of control borders
  • Improved Edit control style on ChooseColor dialog
  • Improved the way that subclasses are handled during theme changes
    • No more Global array to manage subclass handles
  • Miscellaneous code cleanup

Latest download available in the first post of the topic. :)

Posted

"Added support for standalone Scrollbar window with SBS_SIZEBOX or SBS_SIZEGRIP"


Can you explain that to me?

Is it possible to create a standalone scrollbar?

Up until now, I’ve always created a child GUI with a scrollbar and set it to the width of the scrollbar.

Posted
4 hours ago, bladem2003 said:

"Added support for standalone Scrollbar window with SBS_SIZEBOX or SBS_SIZEGRIP"


Can you explain that to me?

I apologize because this sounds very misleading. That is my fault. It technically uses a "Scrollbar" class window, but it only refers to the small 16x16 pixel resize grip (dots) in the bottom right corner that is generally on a statusbar. In this case, it refers to situations where there is no statusbar but there is a resize grip.

4 hours ago, bladem2003 said:

Is it possible to create a standalone scrollbar?

Up until now, I’ve always created a child GUI with a scrollbar and set it to the width of the scrollbar.

This is not something that I have done before, so I don't know. But there are so many things (dozens) that I thought were impossible in AutoIt only to be proven wrong. I would suggest that you create a help topic in the GUI section and describe your goals.

If I remember correctly, there was a UDF by Melba that relates to scrollbars. I don't know how it works under-the-hood though.

Posted

@bladem2003 Do you have any specific nedd for a scrollbar control. There is pager control. Scroll bar control can be generated separatelly. If you have any further questions you should probably start new thread.

 

#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>
#include <GuiScrollBars.au3>

$hMain=GUICreate("Test")
_WinAPI_CreateWindowEx(0,"SCROLLBAR","",BitOR($WS_CHILD, $WS_VISIBLE, $SB_VERT),10,20,20,200,$hMain,0,0,0)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case -3
            Exit
    EndSwitch
WEnd

 

Posted
3 hours ago, ahmet said:

@bladem2003 Do you have any specific nedd for a scrollbar control. There is pager control. Scroll bar control can be generated separatelly. If you have any further questions you should probably start new thread.

 

#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>
#include <GuiScrollBars.au3>

$hMain=GUICreate("Test")
_WinAPI_CreateWindowEx(0,"SCROLLBAR","",BitOR($WS_CHILD, $WS_VISIBLE, $SB_VERT),10,20,20,200,$hMain,0,0,0)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case -3
            Exit
    EndSwitch
WEnd

 

 

I started a new thread

https://www.autoitscript.com/forum/topic/213804-dark-theme-scrollbar/

Posted

GUIDarkTheme 2026.07.26

  • Completed work on dark mode ChooseFont dialog
    • Created/Added new standard WinAPI function _WinAPI_ExtTextOut()
    • ExtTextOutW has significantly faster performance compared to DrawTextW
  • Fixed a potential subclass crash on exit or theme change - thanks argumentum
  • Fixed a potential GDI leak in internal __GUIDarkTheme_GetCtrlColors() function
  • Fixed a logic issue in internal _WinAPI_GetWindowRectAsArray() function
  • Fixed potential process boundry issue in internal _GUICtrlSysLink_GetItemUrl() function

Latest download available in the first post of the topic. :)

Posted (edited)

If there is anyone running a non-English OS, please let me know if there are any problems with the ChooseFont dialog in dark mode.

Also, if you run a non-English OS, can you please see if the following font-related strings show up in your non-English OS as English strings or your native language?

#include <WinAPIRes.au3>
#include <Array.au3>

Local $aStrings[4] = [1101, 1103, 1136, 1137]

Local $sDll = @SystemDir & "\comdlg32.dll"
Local $hInstance = _WinAPI_LoadLibraryEx($sDll, $LOAD_LIBRARY_AS_DATAFILE)

For $i = 0 To UBound($aStrings) - 1
    ConsoleWrite("String: " & _WinAPI_LoadString($hInstance, $aStrings[$i]) & @CRLF)
Next

_WinAPI_FreeLibrary($hInstance)

 

Edited by WildByDesign
Posted

In case it helps, your script on French (old) Windows OS, with these 2 loops :

For $i = 0 To UBound($aStrings) - 1
    $s = "String: " & _WinAPI_LoadString($hInstance, $aStrings[$i])
    ConsoleWrite($s & @CRLF)
Next

ConsoleWrite(@CRLF)

For $i = 0 To UBound($aStrings) - 1
    $s = "String: " & _WinAPI_LoadString($hInstance, $aStrings[$i])
    ConsoleWrite(BinaryToString(StringToBinary($s, 4), 1) & @CRLF) ; to display Unicode chars in Scite Console
Next

Console output (png file just to show the xE9 etc...)

ConsoleOutput.png.df2e6cafd3c9b02eb52aab3a7a38a170.png

 

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
4 hours ago, WildByDesign said:

Also, if you run a non-English OS, can you please see if the following font-related strings show up in your non-English OS as English strings or your native language?

>"C:\Utilities\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Utilities\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Test\Documents\Novo(a) AutoIt v3 Script.au3" /UserParams    
+>19:05:44 Starting AutoIt3Wrapper (pid=10792) 25.205.1420.8 from:SciTE.exe (4.4.6.0)  Keyboard:00020409  OS:WIN_11/2009  CPU:X64 OS:X64  Environment(Language:0416)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Utilities\AutoIt3\SciTE   UserDir => C:\Users\Test\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Test\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.17.2)  from:C:\Utilities\AutoIt3  input:C:\Users\Test\Documents\Novo(a) AutoIt v3 Script.au3
+>19:05:44 AU3Check ended. rc:0
>Running:(3.3.16.1):C:\Utilities\AutoIt3\autoit3.exe "C:\Users\Test\Documents\Novo(a) AutoIt v3 Script.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart. --> Press Ctrl+BREAK to Stop.
String: Esta é uma fonte TrueType. A mesma fonte será usada tanto na impressora quanto na tela.
String: Esta é uma fonte de tela. A fonte de impressora equivalente será usada na impressão.
String: Esta é uma fonte OpenType. A mesma fonte será usada tanto na impressora quanto na tela.
String: Esta é uma fonte OpenType. A mesma fonte será usada tanto na impressora quanto na tela.
>
+>19:05:44 AutoIt3 ended. rc:0
+>19:05:44 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 0.704

 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted (edited)

image.thumb.png.0b973ae17674f18cef085c70566bb519.png

..and had to force-close the script 😭 ( I have v3.3.16.1 in that Brazilian PC ) 

How it should look:
image.thumb.png.b3c10fbdeb04f12491f13b6c3b6964c2.png

Edit:
image.thumb.png.9aac2be6c8df2975f2c6975f5d6437af.png

image.thumb.png.c2861c3b84d9d66945d34a31a381812f.png

Spoiler

 

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted
3 hours ago, pixelsearch said:

In case it helps, your script on French (old) Windows OS, with these 2 loops :

Thanks, that was very helpful. :)

Is the BinaryToString and StringToBinary part needed for adding the strings to a GUI?

 

@argumentum Thanks for the feedback on the ChooseFont dialog on non-English OS. At least on Brazilian Portuguese, it seems like it is failing to obtain the array for the main Font list. I'm not even sure how to proceed with troubleshooting this at the moment.

The $__DM_g_aFontList array gets created in __DM_DialogProc() in the $WM_SHOWWINDOW case because the font list simply isn't populated before that.

If possible, could you try uncommenting _ArrayDisplay($__DM_g_aFontList)...

Actually, I know what the problem is. I'm looking directly for window title "Font" which does not take into consideration different languages. I may have to find out which string that is (same with Color dialog) so that it will work properly with non-English OS. I can't believe I didn't think ahead on that one.🤦‍♂️

Posted
34 minutes ago, WildByDesign said:

Is the BinaryToString and StringToBinary part needed for adding the strings to a GUI?

I don't think so, but in case he reads this, @jchd could answer to your question as he knows everything about it.

The only times I use this syntax is in ConsoleWrite, to make it Unicode-aware. I found this useful syntax in a post of jchd, here.

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
5 hours ago, pixelsearch said:
  6 hours ago, WildByDesign said:

Is the BinaryToString and StringToBinary part needed for adding the strings to a GUI?

Not needed and even worse: it opens the risk of emasculating your pet Unicode strings.

(No idea when/why I became the Luke The Nuke Littler of codepages!)

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...