Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 10/06/2025 in all areas

  1. V1.0.0 released! 🎊 Event on toast interaction now works! 🎉
    6 points
  2. Hello! I'm working on a new GUI builder that I have been making great progress on! A helpful forum member ioa747 answered a question I had which started me on my journey, and now I'd like to present to you an alpha version of the software. As of now only Form and Button works in a rudimentary fashion. To run this, open Guiscape.au3 and go from there! I'd love to hear your feedback and suggestions. 🙂 Latest versions will be on Github from now on. https://github.com/matthewrg/Guiscape Guiscape.zip Downloads: 35
    5 points
  3. Added File path validation to prevent path traversal attacks Parameter safety warnings for autoit.consoleParams to detect potentially dangerous shell metacharacters Workspace symbol performance optimizations with batch processing to prevent UI freezing on large projects Configuration options autoit.workspaceSymbolMaxFiles (default: 500) and autoit.workspaceSymbolBatchSize (default: 10) Configuration option autoit.symbolMaxLines (default: 50000) to control maximum lines processed for symbol information Warning message when files exceed symbol processing limit with actionable instructions Comprehensive unit tests for completion provider with 8 test cases Comprehensive README documentation improvements with installation guide, quick start section, platform support matrix, troubleshooting guide, and reorganized configuration Distribution scripts for packaging the extension to multiple marketplaces: package-all.js for simultaneous packaging to VS Code Marketplace and OpenVSX package-openvsx.js for OpenVSX-specific packaging with publisher name handling Fixed Command injection risk in registry update functionality by replacing exec with execFile for safer argument handling Multiple global output panels opening for AutoIt on startup Memory leak in completion provider where include cache grew indefinitely across document switches Incorrect array comparison logic in completion cache invalidation Cross-document contamination of completion items from include files Changed Simplified ESLint configuration by using globals package and removing redundant rules Workspace symbol cache now uses incremental updates instead of full invalidation on file changes Completion provider now uses per-document Map-based caching with LRU eviction (50 document limit) Include cache automatically cleans up when documents are closed Symbol processing limit increased from hardcoded 10,000 to configurable 50,000 lines by default Removed The unused autoit.YAML-tmLanguage file Rate and View on VS Code Marketplace Star & Submit Issues on GitHub
    5 points
  4. This example script is a desktop live wallpaper program. It is a combination of MediaPlayerElement - WinRT Xaml Island by @MattyD and Move window behind desktop icons by @Parsix. It basically creates a GUI layer under the desktop icons but above the wallpaper (eg. in a WorkerW window within Program Manager). Features: Configuration file (LiveWallpaper.ini) Plays .mp4 videos and likely many more formats Light on CPU (uses GPU for video processing) Play/Pause video by double-click (can change to single-click in config) Option to Loop video Transparency level (to blend video with your real wallpaper) Start button trigger to play media Important Note: To run this, the XAML Islands require the following value in the AutoIt binary manifest: <maxversiontested Id="10.0.18362.1"/> There are two options. The first is ExternalManifest.au3 which essentially drops an external manifest file that includes that value beside your existing AutoIt binaries (eg. AutoIt3.exe.manifest and AutoIt3_x64.exe.manifest). This will allow you to run LiveWallpaper.au3 in your file manager by double-clicking on the script. However, the downside to this method is that it will not work through VSCode or SciTE and therefore you cannot get any ConsoleWrite info if you need it. The second option is Update Manifest.au3 which patches your actual AutoIt binary to include the required maxversiontested value. It makes a backup of your original AutoIt binary and you have to copy the modified one over your original. This is the better method if you want to extend the LiveWallpaper code, run through VSCode or SciTE and add/get console output. If you intend to compile as a binary, that compiled binary needs the maxversiontested value. You need to set the "win10" compatibility flag with AutoIt3Wrapper (already at top of LiveWallpaper.au3) and you need to be using the absolute latest beta version of AutoIt3Wrapper.au3 because the maxversiontested value has been added to it. To Do (possibilities): Option for volume level Option for playback rate Hotkeys Start on trigger (when logging in, when clicking Start menu, etc.) etc. Live Wallpaper Videos: I have only tested a bunch of .mp4 videos with this, including 4K. I have included bloom.mp4 which is rather low quality, but I wanted something that people can test with and it's small enough for attachment space. But there are many, many live wallpaper web sites out there. Some videos look good on loop (like a fireplace), while others don't. I'm sure lots of other video formats work. But I have only tested .mp4 and that is the format that most video wallpaper sites use. LiveWallpaper.7z
    4 points
  5. I've done enough editing of image files to know a few things. If you are going to have % of transparency you should have a small input section from 0 - 255 as exacting levels of transparency. Most people cannot tell the difference of 1% to about 5% level of transparency, but some might want the option to have exacting levels for better control. Don't presume that about me. I don't like to lie as much as stretching the truth so far that is snaps back on me like a rubber band that has broke from the stress.
    4 points
  6. Just a little program I whipped up today. If like me, you connect to the web via LAN, but don't always like your PC to be connected all the time, especially at boot up, then you might find my script handy. Basically I use it to turn my Ethernet connection off. A fairly simple affair, and the state persists after shutdown. BIG THANKS to jguinch for the Network configuration UDF. My script uses and requires the Network.au3 include file from the first post of that topic. My script runs with Admin Rights, as per the first line of the script. Show Adapters.au3 (40 previous downloads) NOTE - On my system, some adapters have a CRLF in the middle of the returned entry. My script changes that, within program, to a backward slash (\) for ease of use etc. As can be noted in the screenshot, the second portion, after the backslash, is the actual adapter name used for ENABLE and DISABLE and getting INFO. To work with the same adapter by default, you can SAVE a selected entry as the one, which can appear selected at startup after first being checked. Enjoy!
    4 points
  7. Nine

    GIF Animation (cached)

    After giving it some thoughts, I went with a callback function to modify any aspect of the GIF frame by frame. You need to provide a valid callback function receiving a GDI+ image handle (originating from the GIF) and returning a modified GDI+ handle to fit the size of the GIF control creation. A few tests showed me that the callback function seems to be the fastest approach. Added a basic example showing how to use the callback. New version available
    4 points
  8. Hi @genius257 Your input data reader works great! I added several inputs and buttons for a quick, rough test, and the values entered into the "toast" are returned to the callback and parsed correctly by your function. It appears that a notification toast doesn't allow more than 5 inputs; each selector input can't contain more than 5 options, and buttons can't exceed 5. Text inputs allow about 2,000 characters. But these limitations are due to the inherent features of Microsoft notification toasts, not your code. ... these toasts are funny... Bye and thanks again! cheers #include "./src/toast.au3" #include <GuiRichEdit.au3> #include <GUIConstantsEx.au3> #include <InetConstants.au3> #include <WinApiReg.au3> #include <WinApiIcons.au3> #include <GDIPlus.au3> #include <WinAPIConv.au3> If Not FileExists(@TempDir & "\e25dbe211ddfb027fcb8271d833159fc.png") Then _GDIPlus_Startup() $thIcons = DllStructCreate("HWND") $x = _WinAPI_ExtractIconEx(@AutoItExe, 0, 0, $thIcons, 1) ConsoleWrite($x & @CRLF) $hBitmap = _GDIPlus_BitmapCreateFromHICON(DllStructGetData($thIcons, 1)) _GDIPlus_ImageSaveToFileEx($hBitmap, @TempDir & "\e25dbe211ddfb027fcb8271d833159fc.png", _GDIPlus_EncodersGetCLSID("PNG")) _GDIPlus_BitmapDispose($hBitmap) ConsoleWrite(@error & @CRLF) _GDIPlus_Shutdown() _WinAPI_DestroyIcon(DllStructGetData($thIcons, 1)) EndIf Global Const $sAppName = @ScriptName Global $tCLSID = _Toast_CoCreateGuid() Global $sGUID = _WinAPI_StringFromGUID($tCLSID) ConsoleWrite("app CLSID: " & $sGUID & @CRLF) _Toast_Initialize($sAppName, $tCLSID, OnToastActivation, "AutoIt Toast Example", @TempDir & "\e25dbe211ddfb027fcb8271d833159fc.png") Opt("GuiOnEventMode", 1) Global $hWnd = GUICreate("Toast example", 700, 320) GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_CLOSE") Global $hButton01 = GUICtrlCreateButton("From template", 10, 10, 200, 120) GUICtrlSetOnEvent(-1, "ToastFromTemplateExample") Global $hButton02 = GUICtrlCreateButton("From XML string", 10, 140, 200, 120) GUICtrlSetOnEvent(-1, "ToastFromXmlString") Global $hRich = _GUICtrlRichEdit_Create($hWnd, "", 220, 10, 470, 300) GUISetState() While 1 Sleep(10) WEnd Func ToastFromTemplateExample() Local $oXml = _Toast_CreateToastTemplateXmlDocument() Local $pToast = _Toast_CreateToastNotificationFromXmlObject($oXml) _Toast_Show($pToast) EndFunc ;==>ToastFromTemplateExample Func DownloadImage() If FileExists(@TempDir & "\e21cd29c9fb51c3a5b82f009ec33fc997d2edd1ece931e8568f37e205c445778.jpeg") Then Return _GUICtrlRichEdit_AppendText($hRich, "Trying to download avatar image from gravatar..." & @CRLF) Local $iBytes = InetGet("https://gravatar.com/avatar/e21cd29c9fb51c3a5b82f009ec33fc997d2edd1ece931e8568f37e205c445778", @TempDir & "\e21cd29c9fb51c3a5b82f009ec33fc997d2edd1ece931e8568f37e205c445778.jpeg", $INET_FORCEBYPASS) Local $error = @error If @error <> 0 Then _GUICtrlRichEdit_AppendText($hRich, "Failed to download image" & @CRLF) Return EndIf _GUICtrlRichEdit_AppendText($hRich, "Done! " & $iBytes & " bytes downloaded" & @CRLF) EndFunc ;==>DownloadImage Func ToastFromXmlString() DownloadImage() ; https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/adaptive-interactive-toasts?tabs=xml Local $sToast = "" $sToast &= "<toast activationType=""foreground"" launch=""action=viewAlarm&amp;alarmId=3"" scenario=""alarm"">" ; action=mainContent;alarmId=3 $sToast &= "" $sToast &= " <visual>" $sToast &= " <binding template=""ToastGeneric"">" $sToast &= " <text>Time to wake up!</text>" $sToast &= " <text>To prove you're awake, select which of the following fruits is yellow...</text>" $sToast &= ' <image placement="appLogoOverride" src="file://' & @TempDir & '\e21cd29c9fb51c3a5b82f009ec33fc997d2edd1ece931e8568f37e205c445778.jpeg" hint-crop="circle"/>' $sToast &= " </binding>" $sToast &= " </visual>" $sToast &= "" $sToast &= " <actions>" $sToast &= "<!-- #1 First input-->" $sToast &= " <input id=""Options"" type=""selection"" defaultInput=""Selection1"">" $sToast &= " <selection id=""Selection1"" content=""Option 1/5""/>" $sToast &= " <selection id=""Selection2"" content=""Option 2/5""/>" $sToast &= " <selection id=""Selection3"" content=""Option 3/5""/>" $sToast &= " <selection id=""Selection4"" content=""Option 4/5""/>" $sToast &= " <selection id=""Selection5"" content=""Option 5/5""/>" ; $sToast &= " <selection id=""Selection6"" content=""Option 6/6""/>" ; No more than 5 options allowed $sToast &= " </input>" $sToast &= "<!-- #2 Second input-->" $sToast &= " <input id=""Poem"" type=""text"" placeHolderContent=""Please write a poem"" />" $sToast &= "<!-- #3 Third input-->" $sToast &= " <input id=""Season"" type=""selection"" defaultInput=""Autumn"">" $sToast &= " <selection id=""Spring"" content=""Spring""/>" $sToast &= " <selection id=""Summer"" content=""Summer""/>" $sToast &= " <selection id=""Autumn"" content=""Autumn""/>" $sToast &= " <selection id=""Winter"" content=""Winter""/>" $sToast &= " </input>" $sToast &= "<!-- #4 Fourth input-->" $sToast &= " <input id=""Mood"" type=""selection"" defaultInput=""Love"">" $sToast &= " <selection id=""Happy"" content=""I'm Happy 😀""/>" $sToast &= " <selection id=""Sad"" content=""I'm Sad 😢""/>" $sToast &= " <selection id=""Love"" content=""I'm in love ❤️""/>" $sToast &= " <selection id=""Angry"" content=""I'm mad at the whole world 🖕""/>" $sToast &= " </input>" $sToast &= "<!-- #5 Fifth input-->" $sToast &= " <input id=""Gender"" type=""selection"" defaultInput=""Female"">" $sToast &= " <selection id=""Male"" content=""I'm a man""/>" $sToast &= " <selection id=""Female"" content=""I'm a woman""/>" $sToast &= " </input>" #cs ; --- No more than 5 inputs allowed and no more than 5 entry --- $sToast &= "<!-- #6 Sixth input-->" $sToast &= " <input id=""WeekDay"" type=""selection"" defaultInput=""Wednesday"">" $sToast &= " <selection id=""Monday"" content=""Monday""/>" $sToast &= " <selection id=""Tuesday"" content=""5 Sincronizza contatti""/>" $sToast &= " <selection id=""Wednesday"" content=""Wednesday""/>" $sToast &= " <selection id=""Thursday"" content=""Thursday""/>" $sToast &= " <selection id=""Friday"" content=""Friday""/>" $sToast &= " <selection id=""Saturday"" content=""Saturday""/>" $sToast &= " <selection id=""Sunday"" content=""Sunday""/>" $sToast &= " </input>" #ce ; --- No more than 5 inputs allowed and no more than 5 entry --- $sToast &= "" $sToast &= " <!-- Button 1 -->" $sToast &= " <action content=""Yes, I agree""" $sToast &= " arguments=""action=Agree""" $sToast &= " activationType=""background""/>" $sToast &= " <!-- Button 2 -->" $sToast &= " <action content=""No, I disagree""" $sToast &= " arguments=""action=Disagree""" $sToast &= " activationType=""background""/>" $sToast &= " <!-- Button 3 -->" $sToast &= " <action content=""Save data""" $sToast &= " arguments=""action=Save""" $sToast &= " activationType=""background""/>" $sToast &= " <!-- Button 4 -->" $sToast &= " <action content=""Open settings""" $sToast &= " arguments=""action=Open""" $sToast &= " activationType=""background""/>" $sToast &= " <!-- Button 5 -->" $sToast &= " <action content=""Dismiss""" $sToast &= " arguments=""action=Dismiss""" $sToast &= " activationType=""background""/>" #cs ; --- No more than 5 buttons allowed --- $sToast &= " <!-- Button 6 -->" $sToast &= " <action content=""Snooze""" $sToast &= " arguments=""action=Snooze""" $sToast &= " activationType=""background""/>" #ce ; --- No more than 5 buttons allowed --- $sToast &= " </actions>" $sToast &= ' <audio src=''ms-winsoundevent:Notification.Looping.Alarm'' loop=''false''/>' $sToast &= "</toast>" ;#ce Local $pToast = _Toast_CreateToastNotificationFromXmlString($sToast) If @error <> 0 Then _GUICtrlRichEdit_AppendText($hRich, _WinAPI_GetErrorMessage(@error)) Return EndIf _Toast_Show($pToast) _GUICtrlRichEdit_AppendText($hRich, $pToast & @TAB & "VarGetType: " & VarGetType($pToast) & @CRLF) EndFunc ;==>ToastFromXmlString ; https://learn.microsoft.com/en-us/windows/win32/api/notificationactivationcallback/nf-notificationactivationcallback-inotificationactivationcallback-activate Func OnToastActivation($pSelf, $appUserModelId, $invokedArgs, $data, $count) _GUICtrlRichEdit_AppendText($hRich, _ "Toast activated!" & @CRLF _ & " " & "appUserModelId: " & $appUserModelId & @TAB & "VarGetType: " & VarGetType($appUserModelId) & @CRLF _ & " " & "invokedArgs: " & $invokedArgs & @TAB & "VarGetType: " & VarGetType($invokedArgs) & @CRLF _ & " " & "$data: " & $data & @TAB & "VarGetType: " & VarGetType($data) & @TAB & DllStructGetData($data, 1) & @CRLF _ ; ??? also _WinAPI_GetString ... no good as well & " " & "$count: " & $count & @TAB & "VarGetType: " & VarGetType($count) & @CRLF _ ) _GUICtrlRichEdit_AppendText($hRich, @CRLF & "-----------------------------" & @CRLF) Local $pData = $data For $i = 1 To $count $tData = DllStructCreate('PTR Key;PTR Value;', $pData) $key = _WinAPI_GetString($tData.Key) $value = _WinAPI_GetString($tData.Value) ; ConsoleWrite(StringFormat('"%s"="%s"\n', $key, $value)) _GUICtrlRichEdit_AppendText($hRich, StringFormat('"%s"="%s"\n', $key, $value)) $pData += DllStructGetSize($tData) Next Return $_Toast_S_OK EndFunc ;==>OnToastActivation Func GUI_CLOSE() Exit EndFunc ;==>GUI_CLOSE
    4 points
  9. Hi @Gianni, Thanks you, glad to see the interest in the code Yes, the $data variable contains a pointer to a array of NOTIFICATION_USER_INPUT_DATA elements. The length of the array is given via the $count variable. Something like this should do it: $pData = $data For $i = 1 To $count $tData = DllStructCreate('PTR Key;PTR Value;', $pData) $key = _WinAPI_GetString($tData.Key) $value = _WinAPI_GetString($tData.Value) ConsoleWrite(StringFormat('"%s"="%s"\n', $key, $value)) $pData += DllStructGetSize($tData) Next I think I'll update the example with inputs to demonstrate later, and I'll also add a helper function to convert the data array into a Map
    4 points
  10. Released Peace version 1.6.8.11. It now support VST plugins by controlling and using Equalizer APO's Configuration Editor. The Peace AutoEQ interface now includes OPRA by Roon (collaborators such as Oratory1990). A new import interface has been created for better import. And a theme can be installed directly from within Peace through a new theme installation interface.
    3 points
  11. So you are a real language ✨Universalist ✨
    3 points
  12. A generic map function: ;Coded by UEZ build 2025-10-29 Func Map($val, $source_start, $source_stop, $dest_start, $dest_stop) Return (($val - $source_start) * ($dest_stop - $dest_start) / ($source_stop - $source_start) + $dest_start) EndFunc $iCol = Int(Map(87, 0, 100, 0, 255)) ConsoleWrite($iCol & " - 0x" & Hex($iCol, 2) & @CRLF) ;87% from color value (0 - 255) $iCol = 1 + Int(Map($iCol, 0, 255, 0, 100)) ;and back again ConsoleWrite($iCol & " - 0x" & Hex($iCol, 2) & @CRLF)
    3 points
  13. Updated v25.205.1420.14 available in Beta.
    3 points
  14. Progress! ... Click the form button beside of the cursor button (more than once if you want to). Now the windows are clipped to the left too! #include-once Opt("WinTitleMatchMode", 4) ; advanced Opt("MouseCoordMode" , 2) #include <WindowsStylesConstants.au3> #include <ButtonConstants.au3> #include <GuiConstantsEx.au3> Global $formList[], $formCount = 0 Global Const $main_width = 815 Global Const $main_height = 860 Global Const $main_left = (@DesktopWidth / 2) - ($main_width / 2) Global Const $main_top = (@DesktopHeight / 2) - ($main_height / 2) Global Const $guiCanvas = GuiCreate("GUI Canvas", $main_width, $main_height, $main_left, $main_top) Global Const $canvas = GuiCreate('', ($main_width - 105), ($main_height - 35), 95, 5, $WS_CHILD, $WS_EX_OVERLAPPEDWINDOW, $guiCanvas) GUISetFont(10, -1, -1, "Segoe UI", $guiCanvas) #region ; menu items Global Const $menu_file = GUICtrlCreateMenu ("File") Global Const $menu_save_definition = GUICtrlCreateMenuitem("Save", $menu_file) ; Roy add-on Global Const $menu_load_definition = GUICtrlCreateMenuitem("Load", $menu_file) ; Roy add-on GUICtrlCreateMenuitem('' , $menu_file) ; Roy add-on Global Const $menu_exit = GUICtrlCreateMenuitem("Exit", $menu_file) Global Const $menu_edit = GUICtrlCreateMenu ("Edit") Global Const $menu_vals = GUICtrlCreateMenuitem("Vals" , $menu_edit) ; added by: TheSaint Global Const $menu_wipe = GUICtrlCreateMenuitem("Clear all controls", $menu_edit) Global Const $menu_about = GUICtrlCreateMenuitem("About" , $menu_edit) ; added by: TheSaint GUICtrlSetState($menu_wipe, $GUI_DISABLE) Global Const $menu_settings = GUICtrlCreateMenu ("Settings") Global Const $menu_show_grid = GUICtrlCreateMenuItem("Show grid" , $menu_settings) Global Const $menu_grid_snap = GUICtrlCreateMenuItem("Snap to grid" , $menu_settings) Global Const $menu_paste_pos = GUICtrlCreateMenuItem("Paste at mouse position" , $menu_settings) Global Const $menu_show_ctrl = GUICtrlCreateMenuItem("Show control when moving", $menu_settings) Global Const $menu_show_hidden = GUICtrlCreateMenuItem("Show hidden controls" , $menu_settings) GUICtrlSetState($menu_show_grid , $GUI_CHECKED ) GUICtrlSetState($menu_grid_snap , $GUI_CHECKED ) GUICtrlSetState($menu_paste_pos , $GUI_CHECKED ) GUICtrlSetState($menu_show_ctrl , $GUI_CHECKED ) GUICtrlSetState($menu_show_hidden, $GUI_UNCHECKED) #endregion ; menu items #region ; toolbar Global Const $default_cursor = CreateToolButton("Cursor" , 5, 5) Global Const $toolForm = CreateToolButton("Form" , 45, 5) Global Const $toolGroup = CreateToolButton("Group" , 5, 45) Global Const $toolButton = CreateToolButton("Button" , 45, 45) Global Const $toolCheckbox = CreateToolButton("Checkbox" , 5, 85) Global Const $toolRadio = CreateToolButton("Radio" , 45, 85) Global Const $toolEdit = CreateToolButton("Edit" , 5, 125) Global Const $toolInput = CreateToolButton("Input" , 45, 125) Global Const $toolLabel = CreateToolButton("Label" , 5, 165) Global Const $toolUpDown = CreateToolButton("UpDown" , 45, 165) Global Const $toolList = CreateToolButton("List" , 5, 205) Global Const $toolCombo = CreateToolButton("Combo" , 45, 205) Global Const $toolDate = CreateToolButton("Date" , 5, 245) Global Const $toolTreeview = CreateToolButton("Treeview" , 45, 245) Global Const $toolProgress = CreateToolButton("Progress" , 5, 285) Global Const $toolAvi = CreateToolButton("Avi" , 45, 285) Global Const $toolIcon = CreateToolButton("Icon" , 5, 325) Global Const $toolPic = CreateToolButton("Pic" , 45, 325) Global Const $toolSlider = CreateToolButton("Slider" , 5, 365) Global Const $toolMenu = CreateToolButton("Menu" , 45, 365) Global Const $toolContextMenu = CreateToolButton("Context Menu", 5, 405) Global Const $toolTab = CreateToolButton("Tab" , 45, 405) #endregion ; toolbar main() Func main() GUISetState(@SW_SHOWNORMAL, $guiCanvas) GUISetState(@SW_SHOWNORMAL, $canvas) Local $msg Do $msg = GUIGetMsg($GUI_EVENT_ARRAY) Switch $msg[1] Case $guiCanvas Switch $msg[0] Case $toolForm CreateForm() Case $GUI_EVENT_CLOSE Exit EndSwitch EndSwitch Until False EndFunc Func CreateForm() GUISwitch($canvas) $formCount += 1 Local Const $form = GuiCreate("Form " & $formCount, 400, 600, 5, 5, BitOR($WS_CHILD, $WS_OVERLAPPEDWINDOW), -1, $canvas) $formList["Form" & $formCount] = $form GUISetState(@SW_SHOWNORMAL, $form) GUISwitch($guiCanvas) Return $form EndFunc Func CreateToolButton(Const $name, Const $left, Const $top) Local Const $tool = GUICtrlCreateRadio($name, $left, $top, 40, 40, BitOR($BS_PUSHLIKE, $BS_ICON)) GUICtrlSetImage($tool, @ScriptDir & "\resources\Icons\" & $name & ".ico") GUICtrlSetTip($tool, $name) Return $tool EndFunc
    3 points
  15. I just wanted to take a moment to thank everyone again who helped with this issue. I've completed the part of the project that relates to the menubar. I actually ended up coloring that line in such a way that it gives the GUI some depth and also made the statusbar sizing and style to match it. When I started learning AutoIt a little over a year ago, I never thought that such beautiful GUIs could be made. I was able to make that line semi-transparent along with the rest of the GUI so that it does the blur behind well and also the Windows 11 materials (Mica, Acrylic, etc.) Cheers everyone! 🍷
    3 points
  16. I am sure he's happy after 5 years!!! 😉
    3 points
  17. That's a very good point. I shouldn't have used a hardcoded path like that. I like the creative way that you used the @AutoItExe macro to get the AutoIt install directory. Thanks for sharing. This was a really fun example. Thanks for sharing. I didn't expect that a child GUI would work in this type of situation, so that was a neat surprise.
    3 points
  18. to test different patterns simultaneously ; https://www.autoitscript.com/forum/topic/212981-move-window-behind-desktop-icons/page/2/#findComment-1544444 #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", True) Example() Func Example() Local $hWorkerW = _GetDesktopWorkerW() If @error Then Exit MsgBox(16, @ScriptName, "! Error - Couldn't find WorkerW under Progman", 30) ConsoleWrite("WorkerW = " & $hWorkerW & @CRLF) ; Overlay GUICreate Local $hGUI = GUICreate("Overlay", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW) Local $BkColor = 0x000000 GUISetBkColor($BkColor, $hGUI) GUISetFont(12) _WinAPI_SetParent($hGUI, $hWorkerW) _WinAPI_SetWindowLong($hGUI, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGUI, $GWL_EXSTYLE), $WS_EX_LAYERED)) _WinAPI_SetLayeredWindowAttributes($hGUI, 0, 150, $LWA_ALPHA) GUISetState(@SW_SHOWNOACTIVATE) Local $aChildGui[10] = [9], $aLbl[10] = [9] Local $iW = @DesktopWidth * 0.33, $iH = @DesktopHeight * 0.33, $iX = 0, $iY = 20, $iCnt = 0 For $i = 1 To 3 For $j = 1 To 3 $iCnt += 1 $aChildGui[$iCnt] = GUICreate("Child_" & $iCnt, $iW, $iH, $iX, $iY, $WS_CHILD, $WS_EX_TOOLWINDOW, $hGUI) $BkColor = "0x" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) ConsoleWrite("$BkColor=" & $BkColor & @CRLF) GUISetBkColor($BkColor, $aChildGui[$iCnt]) $aLbl[$iCnt] = GUICtrlCreateLabel("Child_" & $iCnt & ", BkColor:" & $BkColor, 0, 0, $iW, 25) GUICtrlSetFont(-1, 18) GUISetState(@SW_SHOWNOACTIVATE) $iX += $iW Next $iX = 0 $iY += $iH Next $iCnt = 0 While GUIGetMsg() <> $GUI_EVENT_CLOSE Sleep(50) $iCnt += 1 If $iCnt > 40 Then $iCnt = 0 For $i = 1 To $aChildGui[0] $BkColor = "0x" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) GUISetBkColor($BkColor, $aChildGui[$i]) GUICtrlSetData($aLbl[$i], "Child_" & $i & ", BkColor:" & $BkColor) Next EndIf WEnd EndFunc ;==>Example Func _GetDesktopWorkerW() Local $hWorkerW = 0, $hProgman = _WinAPI_GetShellWindow() _WinAPI_SendMessageTimeout($hProgman, 0x052C, 0, 0, 3000, $SMTO_NORMAL) ; same as _SendMessage() Local $aEnumWindows = WinList("[CLASS:WorkerW]") For $n = 1 To $aEnumWindows[0][0] Local $hWnd = $aEnumWindows[$n][1] If _WinAPI_GetParent($hWnd) = $hProgman Then Return SetError(0, $hProgman, $hWnd) Next Return SetError(1, $hProgman, 0) EndFunc ;==>_GetDesktopWorkerW
    3 points
  19. I was so grouchy at the thought of blasting away my Windows partition to reinstall Windows but thankfully I figured it out before I got that far. In Advanced System Properties (SystemPropertiesAdvanced.exe) in the Performance settings dialog - Visual Effects tab, there is a checkbox labelled "Animate controls and element inside windows". Apparently that simple little checkbox controls whether or not a WorkerW window is even allowed to be created under Progman. I have always disabled any and all animation effects in Windows for years. And this was one of them. After checking this box, WorkerW is able to be created under Progman and all is good now. All examples work on my machine now. I would have reinstalled Windows and it still would have failed because disabling animation effects is one of the first things that I do after a clean install. 😄
    3 points
  20. wakillon

    SlidingToolbar

    No need to click for see it, just put your mouse on the left side of your screen Why on the left? Because the taskbar is already crowded, on the right side we scroll, and at the top when we use our browser tab by tab, it's not convenient to have a GUI in the way. You can add Shortcut, InternetShortcut, Files, and Folder by drag and drop on any button (special folders not supported) Right click menu on it for delete item See tray menu for options To exit, click on the InfoBar at the bottom of the GUI or by tray menu SlidingToolbar.7z
    3 points
  21. UEZ

    AutoIt Snippets

    I don't know if something like this has already been posted. DarkMode API Calls (undocumented): ;Coded by UEZ build 2025-10-10 ;IMMERSIVE_HC_CACHE_MODE Enum $IHCM_USE_CACHED_VALUE, $IHCM_REFRESH Enum $Default, $AllowDark, $ForceDark, $ForceLight, $Max ;$iPreferredAppMode ;~ Enum $DWMWA_USE_IMMERSIVE_DARK_MODE = (@OSBuild <= 18985) ? 19 : 20 Func _WinAPI_ShouldAppsUseDarkMode() Local $aResult = DllCall("UxTheme.dll", "bool", 132) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_ShouldAppsUseDarkMode Func _WinAPI_AllowDarkModeForWindow($hWND, $bAllow = True) Local $aResult = DllCall("UxTheme.dll", "bool", 133, "hwnd", $hWND, "bool", $bAllow) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_AllowDarkModeForWindow Func _WinAPI_AllowDarkModeForApp($bAllow = True) ;Windows 10 Build 17763 Return _WinAPI_SetPreferredAppMode($bAllow ? 1 : 0) ; 1 = AllowDark, 0 = Default EndFunc ;==>_WinAPI_AllowDarkModeForApp Func _WinAPI_SetPreferredAppMode($iPreferredAppMode) ;Windows 10 Build 18362+ Local $aResult = DllCall("UxTheme.dll", "long", 135, "long", $iPreferredAppMode) If @error Then Return SetError(1, 0, False) Return $aResult[0] EndFunc ;==>_WinAPI_SetPreferredAppMode Func _WinAPI_FlushMenuThemes() Local $aResult = DllCall("UxTheme.dll", "none", 136) If @error Then Return SetError(1, 0, False) Return True EndFunc ;==>_WinAPI_FlushMenuThemes Func _WinAPI_RefreshImmersiveColorPolicyState() Local $aResult = DllCall("UxTheme.dll", "none", 104) If @error Then Return SetError(1, 0, False) Return True EndFunc ;==>_WinAPI_RefreshImmersiveColorPolicyState Func _WinAPI_IsDarkModeAllowedForWindow($hWND) Local $aResult = DllCall("UxTheme.dll", "bool", 137, "hwnd", $hWND) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_IsDarkModeAllowedForWindow Func _WinAPI_GetIsImmersiveColorUsingHighContrast($iIMMERSIVE_HC_CACHE_MODE) Local $aResult = DllCall("UxTheme.dll", "bool", 106, "long", $iIMMERSIVE_HC_CACHE_MODE) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_GetIsImmersiveColorUsingHighContrast Func _WinAPI_OpenNcThemeData($hWND, $tClassList) Local $aResult = DllCall("UxTheme.dll", "hwnd", 49, "hwnd", $hWND, "struct*", $tClassList) If @error Then Return SetError(1, 0, False) Return $aResult[0] EndFunc ;==>_WinAPI_OpenNcThemeData Func _WinAPI_ShouldSystemUseDarkMode() Local $aResult = DllCall("UxTheme.dll", "bool", 138) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_ShouldSystemUseDarkMode Func _WinAPI_IsDarkModeAllowedForApp() Local $aResult = DllCall("UxTheme.dll", "bool", 139) If @error Then Return SetError(1, 0, False) Return ($aResult[0] <> 0) EndFunc ;==>_WinAPI_IsDarkModeAllowedForApp Requires OSBuild > 17762! API may change in next Windows updates! PS: I've reinvented the wheel ->
    3 points
  22. Several adjustments were made within the UDF. 1. Writing Excel function cells _xlsx_WriteFromArray() can now write Excel functions. For this, the element value in the input array must be a string that starts with `=`. The string itself is then interpreted as an Excel function. Example: =IF(F2>E2,"yes","no") Note: For Excel to interpret this correctly, only the English notation is permitted. If you need to write a string that starts with `=` but should not be interpreted as a function, escape the first `=` by doubling it (`==`). 2. Smallest possible .xlsx output files The .xlsx file generated with _xlsx_WriteFromArray() has been consistently optimized for minimal size. Files produced this way are close to the minimum possible for the format given the data. Sample dataset: [[1,2,3],[4,5,6]] Excel: 8.45 KB _xlsx_WriteFromArray(): 1.23 KB 3. Formatting of date and time If an element value in the input array for _xlsx_WriteFromArray() contains a date or time, the cell in the .xlsx file is formatted accordingly as date, time, or date/time style. The string format for these cells must be as follows: Date: YYYY-MM-DD Time: HH:MM[:SS[.mmmmmm]] Date + Time: YYYY-MM-DD[T ]HH:MM[:SS[.mmmmmm]] Note: Date and Date+Time remain as string values. A pure time, however, is encoded as a number (Excel notation where 24h = 1.0). Bug fixes and style _xlsx_2Array() can now also handle files whose sharedstrings.xml elements have a prefix (= higher compatibility). _xlsx_2Array() now also reads files that skip empty rows (= higher compatibility). Au3Check no longer emits (partly incorrect) warnings when using the UDF.
    3 points
  23. here is a simple powershell command I use to set an ignore exclusion in Defender for a specific folder Run(@ComSpec & ' /c powershell -Command Add-MpPreference -ExclusionPath ' & '"' & @ScriptDir & '"' & ' -Force', @ScriptDir, @SW_HIDE) Use this command where ever your compiled script is to be created. By changing the word Add to Remove, it will remove the set exclusion. This script will require Administrative rights to be able to perform its function(s).
    3 points
  24. UEZ's solution is better - but I did the work so... Technically it'll be in the ttf/otf itself in the name table #include <AutoitConstants.au3> #include <FileConstants.au3> Local $hFontFile = FileOpen("C:\Windows\Fonts\wingding.ttf", $FO_BINARY) Local $tagTTCHeader = "align 4; uint sfntVersion; ushort numTables; ushort searchRange; ushort entrySelector; ushort rangeShift" Local $tTTCHeader = DllStructCreate($tagTTCHeader) Local $iTTCHeaderLen = DllStructGetSize($tTTCHeader) Local $tTTCHeaderBuff = DllStructCreate(StringFormat("byte data[%d]", $iTTCHeaderLen), DllStructGetPtr($tTTCHeader)) $tTTCHeaderBuff.Data = FileRead($hFontFile, $iTTCHeaderLen) Local $iNumTables = _ByteSwap($tTTCHeader.numTables, 16) Local $tagTableRecord = "align 4; char tag[4]; uint checksum; uint offset; uint length" Local $tTableRecord = DllStructCreate($tagTableRecord) Local $iTableRecordLen = DllStructGetSize($tTableRecord) Local $tTableRecordBuff = DllStructCreate(StringFormat("byte data[%d]", $iTableRecordLen), DllStructGetPtr($tTableRecord)) Local $iNameTabOffset, $iNameTabTotalLen For $i = 1 To $iNumTables $tTableRecordBuff.Data = FileRead($hFontFile, $iTableRecordLen) ConsoleWrite(StringFormat("table: %s Offset: %08x Length: %08x\r\n", _ $tTableRecord.tag, _ByteSwap($tTableRecord.Offset), _ByteSwap($tTableRecord.Length))) If $tTableRecord.tag = "name" Then $iNameTabOffset = _ByteSwap($tTableRecord.Offset) $iNameTabLen = _ByteSwap($tTableRecord.Length) ExitLoop EndIf Next FileSetPos($hFontFile, $iNameTabOffset, $FILE_BEGIN) Local $tagNameTable = "align 4; ushort version; ushort count; ushort storageOffset" Local $tNameTable = DllStructCreate($tagNameTable) Local $iNameTabLen = DllStructGetSize($tNameTable) Local $tNameTableBuff = DllStructCreate(StringFormat("byte data[%d]", $iNameTabLen), DllStructGetPtr($tNameTable)) $tNameTableBuff.data = FileRead($hFontFile, $iNameTabLen) Local $iNameRecordCount = _ByteSwap($tNameTable.count, 16) Local $iNameStorageOffset = _ByteSwap($tNameTable.storageOffset, 16) Local $tagNameRecord = "align 4; ushort platformID; ushort encodingID; ushort languageID; ushort nameID; ushort length; ushort stringOffset;" Local $tNameRecord = DllStructCreate($tagNameRecord) Local $iNameRecordLen = DllStructGetSize($tNameRecord) Local $tNameRecordBuff = DllStructCreate(StringFormat("byte data[%d]", $iNameRecordLen), DllStructGetPtr($tNameRecord)) Local $iFontFamilyNameOffset, $iFontFamilyNameLen For $i = 1 To $iNameRecordCount $tNameRecordBuff.data = FileRead($hFontFile, $iNameRecordLen) ConsoleWrite(StringFormat("NameRecord: nameID: %04x length %04x offset %04x", _ _ByteSwap($tNameRecord.nameID, 16), _ByteSwap($tNameRecord.length, 16), _ByteSwap($tNameRecord.stringOffset, 16)) & @CRLF) If _ByteSwap($tNameRecord.nameID, 16) = 1 Then ; Font Family name. $iFontFamilyNameLen = _ByteSwap($tNameRecord.length, 16) $iFontFamilyNameOffset = _ByteSwap($tNameRecord.stringOffset, 16) ExitLoop EndIf Next FileSetPos($hFontFile, $iNameTabOffset + $iNameStorageOffset + $iFontFamilyNameOffset, $FILE_BEGIN) Local $tFontFamilyName = DllStructCreate(StringFormat("char Name[%d]", $iFontFamilyNameLen)) Local $tFontFamilyNameBuff = DllStructCreate(StringFormat("byte data[%d]", $iFontFamilyNameLen), DllStructGetPtr($tFontFamilyName)) $tFontFamilyNameBuff.Data = FileRead($hFontFile, $iFontFamilyNameLen) MsgBox(0, "Font Family Name", $tFontFamilyName.Name) FileClose($hFontFile) Func _ByteSwap($iInt, $iSize = 32) Switch $iSize Case 16 Return BitAND(0xFFFF, BitOR(BitAND(0xFF00, BitShift($iInt, -8)), BitShift($iInt, 8))) Case 32 Local $tBuff = DllStructCreate("byte[4]") For $i = 1 To 4 DllStructSetData($tBuff, 1, BitAND($iInt, 0xFF), 5-$i) $iInt = BitShift($iInt, 8) Next Local $tInt = DllStructCreate("int", DllStructGetPtr($tBuff)) Return DllStructGetData($tInt, 1) EndSwitch EndFunc
    3 points
  25. _DTFormat Formats a given date/time string according to the specified format. _DTFormat($sDate, $sFormat [, $iLcid = $LOCALE_USER_DEFAULT]) $sDate - The date string to be formatted "[YYYY/MM/DD][ HH:MM:SS [ tt]]" $sFormat - A string containing the desired format for the date and time. Supported tokens are: Date and/or Time Date: d, dd = day; ddd, dddd = day of week; M= month; y = year Time: h= hour m= minute s = second (long time only) tt= AM. or P.M. h/H = 12/24 hour hh, mm, ss = display leading zero h, m, s = do not display leading zero Tokens can be separated by '|' to specify different formats for date and time. $iLcid - [optional] The locale identifier. Defaults to the user's default locale (default is $LOCALE_USER_DEFAULT). ; https://www.autoitscript.com/forum/topic/213249-free-style-datetimeformat/ ;---------------------------------------------------------------------------------------- ; Title...........: _DTFormat.au3 ; Description.....: Formats a given date/time string according to the specified format. ; AutoIt Version..: 3.3.16.1 Author: ioa747 Script Version: 0.1 ; Note............: Testet in Win10 22H2 Date:07/10/2025 ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <Date.au3> Example() ; Function to demonstrate the use of _DTFormat Func Example() ; https://help.tradestation.com/10_00/eng/tsdevhelp/elobject/class_el/lcid_values.htm ; Example using specific LCID (German=1031, English=1033, Spain=1034, France=1036) ConsoleWrite("- German : " & _DTFormat("2025/09/01 08:30:00 PM", "dddd, d MMMM yyyy|, HH:mm", 1031) & @CRLF) ConsoleWrite("- English : " & _DTFormat("2025/09/01 08:30:00 PM", "dddd, d MMMM yyyy|, HH:mm", 1033) & @CRLF) ConsoleWrite("- Spain : " & _DTFormat("2025/09/01 08:30:00 PM", "dddd, d MMMM yyyy|, HH:mm", 1034) & @CRLF) ConsoleWrite("- France : " & _DTFormat("2025/09/01 08:30:00 PM", "dddd, d MMMM yyyy|, HH:mm", 1036) & @CRLF) ConsoleWrite("-" & @CRLF) ; Example using the default User Locale LCID ConsoleWrite("- User Locale : " & _DTFormat("2025/09/01 20:30:00", "dddd, d MMMM yyyy|, hh:mm tt") & @CRLF) ConsoleWrite("- MMMM yyyy : " & _DTFormat("2025/09/01", "MMMM yyyy") & @CRLF) ConsoleWrite("- Date & Time : " & _DTFormat("2025/09/01 20:30:00", "'Date:' dddd d|, 'Time:' HH:mm") & @CRLF) ConsoleWrite("-" & @CRLF) ; More Example ConsoleWrite("- only Time : " & _DTFormat("08:30:00 PM", "HH:mm:ss") & @CRLF) ConsoleWrite("- only Date : " & _DTFormat("2025/09/01", "dddd, d MMMM yyyy") & @CRLF) ConsoleWrite("-" & @CRLF) ConsoleWrite("- _NowCalc() : " & _NowCalc() & @CRLF) ConsoleWrite("- only Time : " & _DTFormat(_NowCalc(), "|HH:mm:ss") & @CRLF) ConsoleWrite("- only Date : " & _DTFormat(_NowCalc(), "dddd, d MMMM yyyy|") & @CRLF) ConsoleWrite("-" & @CRLF) ConsoleWrite("- ! HH with tt: " & _DTFormat("08:30:00 PM", "HH:mm tt") & @CRLF) ConsoleWrite("- Now Stamp : " & _DTFormat(_NowCalc(), "yyyy_MM_dd|_HH_mm_ss_" & @MSEC) & @CRLF) ConsoleWrite("-" & @CRLF) EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name...........: _DTFormat ; Description....: Formats a given date/time string according to the specified format. ; Syntax.........: _DTFormat($sDate, $sFormat [, $iLcid = $LOCALE_USER_DEFAULT]) ; Parameters.....: $sDate - The date string to be formatted "[YYYY/MM/DD][ HH:MM:SS [ tt]]". ; $sFormat - A string containing the desired format for the date and time. ; Supported tokens are: Date and/or Time ; Date: ; d, dd = day; ddd, dddd = day of week; M= month; y = year ; Time: ; h= hour m= minute ; s = second (long time only) ; tt= AM. or P.M. ; h/H = 12/24 hour ; hh, mm, ss = display leading zero ; h, m, s = do not display leading zero ; Tokens can be separated by '|' to specify different formats for date and time. ; $iLcid - [optional] The locale identifier. Defaults to the user's default locale (default is $LOCALE_USER_DEFAULT). ; Return values .: Success: Returns the formatted date string. ; Failure: Returns an empty string and set the @error flag to non-zero. ; @error: ; 1 - Error date is not valid. ; 2 - Error in splitting the date string ; 3 - Error in encoding SystemTime ; 4 - Error in time formatting ; 5 - Error in date formatting ; Author ........: ioa747 ; Modified ......: ; Remarks .......: This function uses the Windows API to format date and time according to the specified locale. ; Related .......: _Date_Time_EncodeSystemTime, _WinAPI_GetDateFormat, _WinAPI_GetTimeFormat, _WinAPI_GetLocaleInfo ; Link ..........: https://learn.microsoft.com/en-us/windows/win32/intl/day--month--year--and-era-format-pictures ; Example .......: MsgBox(0, "Formatted Date", _DTFormat("2023/10/05 14:30:00", "MM/DD/YYYY|, HH:MM:SS")) ; =============================================================================================================================== Func _DTFormat($sDate, $sFormat, $iLcid = $LOCALE_USER_DEFAULT) Local $asDatePart[4], $asTimePart[4] Local $sTempDate = "", $sTempTime = "" Local $sAM, $sPM, $sTempString = "" Local $bDate = True ; If there is no date, add a dummy one (2000/01/01) If StringInStr($sDate, "/") = 0 And Not @error Then $bDate = False $sDate = "2000/01/01 " & $sDate Else ; Verify If InputDate is valid If Not _DateIsValid($sDate) Then Return SetError(1, 0, "") ; Error date is not valid. EndIf ; Split the date and time into arrays _DateTimeSplit($sDate, $asDatePart, $asTimePart) If @error Then Return SetError(2, @error, "") ; Error in splitting the date string Local $aPart = StringSplit($sFormat, "|") If $bDate Then $sTempDate = $aPart[1] $sTempTime = "" If $aPart[0] = 2 Then $sTempTime = $aPart[2] Else $sTempTime = $aPart[1] EndIf ; If time parts exist, check for AM/PM and convert to 24-hour format If $asTimePart[0] > 1 Then ; Get locale's AM designator, or AM $sTempString = _WinAPI_GetLocaleInfo($iLcid, $LOCALE_S1159) ; AM designator. If Not @error And Not ($sTempString = '') Then $sAM = $sTempString Else $sAM = "AM" EndIf ; Get locale's PM designator, or PM $sTempString = _WinAPI_GetLocaleInfo($iLcid, $LOCALE_S2359) ; PM designator. If Not @error And Not ($sTempString = '') Then $sPM = $sTempString Else $sPM = "PM" EndIf ; Convert 12-hour clock (with PM) to 24-hour clock If (StringInStr($sDate, 'pm') > 0) Or (StringInStr($sDate, $sPM) > 0) Then If $asTimePart[1] < 12 Then $asTimePart[1] += 12 ; Convert 12-hour clock (with AM) to 24-hour clock (handle 12 AM midnight case) ElseIf (StringInStr($sDate, 'am') > 0) Or (StringInStr($sDate, $sAM) > 0) Then If $asTimePart[1] = 12 Then $asTimePart[1] = 0 EndIf EndIf ; Remove ' tt' if hour is in format H/24 hour If StringInStr($sTempTime, "H", 1) > 0 Then $sTempTime = StringReplace($sTempTime, " tt", "") ; Encode a system time structure (required by WinAPI date/time functions) Local $tSystem = _Date_Time_EncodeSystemTime($asDatePart[2], $asDatePart[3], $asDatePart[1], $asTimePart[1], $asTimePart[2], $asTimePart[3]) If @error Then Return SetError(3, @error, "") ; Error in encoding SystemTime Local $sfinalTime = _WinAPI_GetTimeFormat($iLcid, $tSystem, 0, $sTempTime) If @error Then Return SetError(4, @error, "") ; Error in time formatting ; Force AM/PM if the format string contains 'tt' but regional settings didn't include it If StringInStr($sTempTime, "tt") Then If (StringInStr($sfinalTime, 'pm') = 0) And (StringInStr($sfinalTime, $sPM) = 0) And _ (StringInStr($sfinalTime, 'am') = 0) And (StringInStr($sfinalTime, $sAM) = 0) Then If $asTimePart[1] < 12 Then $sfinalTime &= " " & $sAM Else $sfinalTime &= " " & $sPM EndIf EndIf EndIf Local $sResult = "" If $sTempDate <> "" Then $sResult &= _WinAPI_GetDateFormat($iLcid, $tSystem, 0, $sTempDate) If @error Then Return SetError(5, @error, "") ; Error in date formatting If $sTempTime <> "" Then $sResult &= $sfinalTime Return $sResult EndFunc ;==>_DTFormat Please, every comment is appreciated! leave your comments and experiences here! Thank you very much
    3 points
  26. Thank you! 🥰 It's a problem I'm in the middle of working on. I got side quested with this DPI stuff. 😂 I learned a lot and now I have something to bring into my future projects! Updated at GitHub because I made some oopsies!
    2 points
  27. https://github.com/matthewrg/Guiscape
    2 points
  28. No worries! This one probably needs a tidy up - but here's a rough snappy-snappy version. If this is useful, I can probably just keep chipping away at it over the weekend if you'd like? - Just proof of concept things like click-to-select, or multi-select with shift & ctrl etc.. Edit: You need to drag out rectangles to create buttons in this example! #include <guiConstants.au3> #include <winapi.au3> Global Const $MK_LBUTTON = 1 Global Const $iSnap = 15 Global $hCursor_Cross = _WinAPI_LoadCursor(0, $IDC_CROSS) Global $hGui = GUICreate("", 300, 200, 100, 100, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) Global $hBtnProc = DllCallbackRegister("btnProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pBtnProc = DllCallbackGetPtr($hBtnProc) Global $hWndProc = DllCallbackRegister("WndProc", "lresult", "hwnd;uint;wparam;lparam;uint_ptr;dword_ptr") Global $pWndProc = DllCallbackGetPtr($hWndProc) _WinAPI_SetWindowSubclass($hGui, $pWndProc, 1000) GUISetState() Local $iMsg While WinExists($hGui) $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _WinAPI_RemoveWindowSubclass($hGui, $pWndProc, 1000) Func WndProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Local Static $bDrawRect, $tRect = DllStructCreate($tagRect) Switch $iMsg Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCLIENT Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_LBUTTONDOWN $tRect.Left = BitAND($lParam, 0xFFFF) $tRect.Top = BitShift($lParam, 16) $tRect.Left -= Mod($tRect.Left, $iSnap) $tRect.Top -= Mod($tRect.Top, $iSnap) $bDrawRect = True $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_MOUSEMOVE ;~ Local $iX = BitAND($lParam, 0xFFFF), $iY = BitShift($lParam, 16) If BitAND($wParam, $MK_LBUTTON) = $MK_LBUTTON Then _WinAPI_InvalidateRect($hWnd, $tRect, True) $tRect.Right = BitAND($lParam, 0xFFFF) $tRect.Bottom = BitShift($lParam, 16) $tRect.Right -= Mod($tRect.Right, $iSnap) $tRect.Bottom -= Mod($tRect.Bottom, $iSnap) _WinAPI_InvalidateRect($hWnd, $tRect, True) $iRet = 0 Else $bDrawRect = False $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_PAINT If $bDrawRect Then Local $tPaintStruct = $tagPAINTSTRUCT Local $hDC = _WinAPI_BeginPaint($hWnd, $tPaintStruct) Local $hPen = _WinAPI_CreatePen($PS_DOT, 1, _WinAPI_RGB(0, 0, 0)) Local $hBrush = _WinAPI_GetStockObject($WHITE_BRUSH) _WinAPI_SelectObject($hDC, $hPen) _WinAPI_SelectObject($hDC, $hBrush) _WinAPI_Rectangle($hDC, $tRect) _WinAPI_DeleteObject($hPen) _WinAPI_DeleteObject($hBrush) _WinAPI_EndPaint($hWnd, $tPaintStruct) $iRet = 0 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case $WM_LBUTTONUP $bDrawRect = False $tRect.Right = BitAND($lParam, 0xFFFF) $tRect.Bottom = BitShift($lParam, 16) $tRect.Right -= Mod($tRect.Right, $iSnap) $tRect.Bottom -= Mod($tRect.Bottom, $iSnap) _WinAPI_InvalidateRect($hWnd, $tRect, True) Local $idBtn = GUICtrlCreateButton("", _ ($tRect.Left < $tRect.Right) ? $tRect.Left : $tRect.Right, _ ($tRect.Top < $tRect.Bottom) ? $tRect.Top : $tRect.Bottom, _ Abs($tRect.Left - $tRect.Right), _ Abs($tRect.Top - $tRect.Bottom)) _WinAPI_SetWindowSubclass(GUICtrlGetHandle($idBtn), $pBtnProc, $idBtn) $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SIZE ;This prevents autoit's docking logic from moving controls around on window restore. $iRet = _WinAPI_DefWindowProcW($hWnd, $iMsg, $wParam, $lParam) Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc ;==>WndProc Func btnProc($hWnd, $iMsg, $wParam, $lParam, $iIdSubclass, $dwRefData) Local $iRet Local Static $iXOffset, $iYOffset Switch $iMsg Case $WM_NCHITTEST Local $aPoint[2] = [BitAND($lParam, 0xFFFF), BitShift($lParam, 16)] ;Mouse coords can be negative on edge cases! If BitAND($aPoint[0], 0x8000) Then $aPoint[0] = BitOR(0xFFFF0000, $aPoint[0]) If BitAND($aPoint[1], 0x8000) Then $aPoint[1] = BitOR(0xFFFF0000, $aPoint[1]) Local $aPos = WinGetPos($hWnd), $iMar = 10 $iRet = $HTCAPTION If $aPoint[0] - $aPos[0] < $iMar Then $iRet = $HTLEFT If $aPoint[0] - $aPos[0] > ($aPos[2] - $iMar) Then $iRet = $HTRIGHT If $aPoint[1] - $aPos[1] < $iMar Then Switch $iRet Case $HTLEFT $iRet = $HTTOPLEFT Case $HTRIGHT $iRet = $HTTOPRIGHT Case Else $iRet = $HTTOP EndSwitch ElseIf $aPoint[1] - $aPos[1] > ($aPos[3] - $iMar) Then Switch $iRet Case $HTLEFT $iRet = $HTBOTTOMLEFT Case $HTRIGHT $iRet = $HTBOTTOMRIGHT Case Else $iRet = $HTBOTTOM EndSwitch EndIf If $aPoint[0] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) If $aPoint[1] < 0 Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) _WinAPI_RedrawWindow($hWnd) Case $WM_NCLBUTTONDBLCLK ;Prevent double-click maximizing in "caption" If $wParam <> $HTCAPTION Then $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SIZING Local $tRect = DllStructCreate($tagRect, $lParam) Local $tRect2 = _WinAPI_GetWindowRect($hWnd) $tRect.Left += Mod($tRect2.Left - $tRect.Left, $iSnap) $tRect.Top += Mod($tRect2.Top - $tRect.Top, $iSnap) $tRect.Right += Mod($tRect2.Right - $tRect.Right, $iSnap) $tRect.Bottom += Mod($tRect2.Bottom - $tRect.Bottom, $iSnap) $iRet = True Case $WM_MOVING Local $tRect = DllStructCreate($tagRect, $lParam) Local $tRect2 = _WinAPI_GetWindowRect($hWnd) $iXOffset += $tRect.Left - $tRect2.Left $iYOffset += $tRect.Top - $tRect2.Top Local $iSnapH = Floor($iXOffset / $iSnap) * $iSnap Local $iSnapV = Floor($iYOffset / $iSnap) * $iSnap $iXOffset -= $iSnapH $iYOffset -= $iSnapV $tRect.Left = $tRect2.Left + $iSnapH $tRect.Right = $tRect2.Right + $iSnapH $tRect.Top = $tRect2.Top + $iSnapV $tRect.Bottom = $tRect2.Bottom + $iSnapV $iRet = 0 Case $WM_EXITSIZEMOVE $iXOffset = 0 $iYOffset = 0 $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) Case $WM_SETCURSOR Local $iSrc = BitAND($lParam, 0xFFFF), $iEvent = BitShift($lParam, 16) If $iSrc = $HTCAPTION And $iEvent = $WM_LBUTTONDOWN Then _WinAPI_SetCursor($hCursor_Cross) $iRet = 1 Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndIf Case Else $iRet = _WinAPI_DefSubclassProc($hWnd, $iMsg, $wParam, $lParam) EndSwitch Return $iRet EndFunc ;==>btnProc
    2 points
  29. Local. Inside the function.
    2 points
  30. ...and !, the .ru too
    2 points
  31. It’s Argumentum who is active here and on the german forum.
    2 points
  32. Some 3 month ago examples were added for what I see. Following the examples should show what each function does. I don't use spreadsheets but if I needed to, I'd have to learn that, ... in a hurry. And automate it even faster ( all this while clueless "inexperienced" ) I don't think that there is a way around "the learning curve". Maybe making wrapper functions ala "Word user defined functions" would help for the _LODoc_* functions 🤔 I believe that if something is overwhelming, it is so for the uninitiated, and not because is poorly thought-out. Ok, let's look at me. I push for forking and wrote some wrappers/ideas yet, many find it overwhelming/too much/too difficult. What can I do 🤷‍♂️ Nothing. Each will gain understanding as they gain experience with the concept(s) and the solution(s). Yeah. Nothing you can do other than examples for the functions and that you did.
    2 points
  33. Hello Here is my network UDF. Do not yell at me if it already exists ... I hope it will be useful to someone. Please, let me know if you have any problem. All functions that perform modifications required administrator rights Functions list : Internal functions only : Examples : #Include "network.au3" ; List of availables connections/cards #Include <array.au3> ; only for _ArrayDisplay() $infos = _GetNetworkAdapterList() _ArrayDisplay($infos) ; Network card informations for the network connection called "Local Area Network" $infos = _GetNetworkAdapterInfos("Local Area Network") _ArrayDisplay($infos) ; Disable a network connection _DisableNetAdapter("Broadcom NetLink (TM) Gigabit Ethernet") ; OR _DisableNetAdapter("Local Area Network") ; Enable a network connection _EnableNetAdapter("Local Area Network") ; OR _EnableNetAdapter("Broadcom NetLink (TM) Gigabit Ethernet") ; Enable DHCP (for IP Address) _EnableDHCP("Broadcom NetLink (TM) Gigabit Ethernet") ; OR _EnableDHCP("Local Area Network") ; Configure a static IP adress _EnableStatic("Broadcom NetLink (TM) Gigabit Ethernet", "192.168.10.11", "255.255.255.0") ; OR _EnableStatic("Local Area Network", "192.168.10.11", "255.255.255.0") ; Configure the default gateway _SetGateways("Broadcom NetLink (TM) Gigabit Ethernet", "192.168.10.1") ; OR _SetGateways("Local Area Network", "192.168.10.1") ; Configure DNS servers Local $DNS_SERVERS[4] = [ "192.168.100.1", "192.168.100.2", "192.168.100.3", "192.168.100.4" ] _SetDNSServerSearchOrder("Local Area Network", $DNS_SERVERS) ; OR _SetDNSServerSearchOrder("Broadcom NetLink (TM) Gigabit Ethernet", $DNS_SERVERS) ; Configure the DNS domain name _SetDNSDomain ("Local Area Network", "mondomain.loc") ; OR _SetDNSDomain ("Broadcom NetLink (TM) Gigabit Ethernet", "mondomain.loc") ; Configure the DNS suffixes for all connections : Local $DNS_SUFFIXES[2] = [ "mondomain.loc", "mydomain.priv" ] _SetDNSSuffixSearchOrder($DNS_SUFFIXES) ; Clear the DNS cache (like ipconfig /flushdns) _FlushDNS() ; Remove an entry from the DNS cache _FlushDNSEntry("www.autoitscript.com") ; Configure the WINS servers (very old, now ...) _SetWINSServer("Local Area Network", "192.168.100.251", "192.168.100.252") ; OR _SetWINSServer("Broadcom NetLink (TM) Gigabit Ethernet", "192.168.100.251", "192.168.100.252") ; Enable the two options : ; - Register this connection's address in DNS ( first parameter) ; - Use this connection's DNS suffix in DNS registration (second parameter) _SetDynamicDNSRegistration("Local Area Network", True, True) ; Release the DHCP lease _ReleaseDHCPLease() ; Renew the DHCP lease _RenewDHCPLease() ; Sets the Private category to the network connection called "LAN" _SetCategory("LAN", 1) Download link : Network.au3
    2 points
  34. ..we'll still need those *.manifest for testing the scripts w/o compiling. Hopefully @Jon get's to compile the next AutoIt3 version with this in it.
    2 points
  35. Thank you all so much. WildByDesign and I hit on the cause at the same time. I uninstalled AutoIT (again) and just checked through that it had all gone before restarting the machine. I discovered the C:\Users\your-user-name\AppData\Local\AutoIt v3 folders still sitting there with files in, so I deleted those. I also found several folders hanging around in odd places in the main folder structure, so it looks like I had some debris from my (now past) Windows 10 days which may have caused further problems. I deleted those too. Argumentum, yes, you were right - I had only installed the VCRedist C++ libraries up to 2017. Adding the missing 2018 to 2025 ones didn't immediately solve the problem but by being there, they have got to help. Did a fresh AutoIT v.3.3.18.0 install and found that the included SciTE Lite worked properly (i.e. as I had hoped) and then went on to install Jos' full SciTE v4.4.6 version and that works too. Solution: Do an AutoIT and SciTE uninstall and then delete the hidden C:\Users\<username>\AppData\Local\AutoIT v3\ folders before restarting and reinstalling. Check VCRedist status because upgrading Windows does not update the libraries. Once again, thanks to all of you for your help John G0GCD EDIT: For information, as I normally do, I updated my installation instructions and archived the installation files that I have used. (AutoIT3 v3.3.18.0, SciTE4AutoIT3 v4.4.6 on WIndows 11 Home). I then followed the instructions to ensure that I had cracked the problem but, unfortunately, I've broken the installation - the delay is back. So, briefly, I've unmarked the answer as a solution until I've bottomed it out. Clearly, however, it is to do with my machine and the versions of files that I'm using. I'll update the thread once I've fixed it. PS. Jos' SciTE4AutoIT3 v4.4.6 (installer), downloaded from https://www.autoitscript.com/site/autoit-script-editor/downloads/ still has the bug 'Missing Global $__WINVER declaration' in SciTe Jump.au3. Am I downloading the wrong thing?
    2 points
  36. So maybe i just haven't been looking hard enough, but i could not find how to make toast notifications in win8+ from AutoIt. I looked at it on and off, and finally made some progress. Github repository: https://github.com/genius257/au3toast Zip download: https://github.com/genius257/au3toast/archive/refs/tags/1.0.0.zip Enjoy!
    2 points
  37. Tremendous! Thank you, this gives me something to tinker with!
    2 points
  38. You could have more instances looking for it and report via IPC ( my take on "how" here ) and there are a few in the WiKi that you can try. This way if you run 8 chunks of screen, it'll 8 times faster of whatever technique you use.
    2 points
  39. #NoTrayIcon #include <AutoItConstants.au3> #include <TrayConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> Global $hGUI Opt("TrayMenuMode", 3) Opt("TrayAutoPause", 0) Opt("TrayOnEventMode", 1) TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, 'idGUI') TraySetClick(16) Global $idGUI = TrayCreateItem("Show GUI") TrayItemSetOnEvent($idGUI, "idGUI") TrayCreateItem("") Global $idExit = TrayCreateItem('Exit') TrayItemSetOnEvent($idExit, "_Exit") TraySetIcon(@AutoItExe, 1) TraySetToolTip("Show GUI") Example() Func Example() Local $sDefaultstatus = "Ready" $hGUI = GUICreate("My GUI menu", 300, 200) Local $idMnu_File = GUICtrlCreateMenu("&File") Local $idMnu_Help = GUICtrlCreateMenu("Help") Local $idMni_Info = GUICtrlCreateMenuItem("About", $idMnu_Help) Local $idMnu_View = GUICtrlCreateMenu("View", -1, 1) Local $idBtn_Hide = GUICtrlCreateButton("Hide GUI", 50, 130, 70, 20) GUICtrlSetState(-1, $GUI_FOCUS) Local $idBtn_Cancel = GUICtrlCreateButton("Exit", 180, 130, 70, 20) Local $idLbl_Status = GUICtrlCreateLabel($sDefaultstatus, 0, 165, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN)) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $idBtn_Hide ;~ GUISetState(@SW_HIDE, $hGUI) WinSetState($hGUI, "", @SW_HIDE) Case $idBtn_Cancel, $GUI_EVENT_CLOSE ExitLoop Case $idMni_Info MsgBox($MB_SYSTEMMODAL, "Info", "Only a test...") EndSwitch WEnd GUIDelete() EndFunc ;==>Example Func _Exit() Exit EndFunc Func idGUI() If Not BitAND(WinGetState($hGUI), $WIN_STATE_VISIBLE) Then WinSetState($hGUI, "", @SW_SHOW) ;~ ; get GUI window state ;~ Local $iState = WinGetState($hGUI) ;~ If $iState <> $WIN_STATE_VISIBLE Then GUISetState(@SW_SHOW, $hGUI) EndFunc yes, is an old bug, and the way it is. Fortunately you can get around it.
    2 points
  40. Finally! Latest version in the OP. Huge shoutout to Jos because I leaned very heavily on his AutoItGotoDefinition (you did write that I assume?).
    2 points
  41. This works properly, yes. Thank you. It also worked once I applied DPI scaling of 125%. But once I tried 150% and higher the line did not line up anymore. But I understand that it is not supporting DPI yet. EDIT: By the way, I wanted to mention that not only is your coding incredible, but I really wanted to point out the fact that your code comments are also very easy to understand and therefore helpful for anyone reading your code. I appreciate the extra effort that you put into code comments.
    2 points
  42. Sure it's enough and better, no need of the optional parameter when calling gui2() Well done !
    2 points
  43. @ioa747 hello Maybe ermar asks for this : when he clicks on button "Traitement" in GUI1, then the function Traitement_intermediaire() is called, which calls gui2() and creates the listview. Now he starts to modify the listview, but suddenly he would like to cancel everything. Unfortunately, when he clicks the button "Cancel" in GUI2, the function Traitement_intermediaire() continues with this line in Traitement_intermediaire() MsgBox(0, "Suite", "cela continue") ;suite du script So we should indicate a way so the Cancel button in GUI2 reacts differently, depending on the part of the script which called gui2() 1) If gui2() was called from the function On_Button() => Case $g_idButton2 => gui2() , then no change is required 2) If gui2() was called from the function Traitement_intermediaire() => gui2() , then some code is required in case the user clicks on button Cancel in GUI2 . The change could be like this : Func Traitement_intermediaire() ; gui2() If gui2(1) Then Return MsgBox(0, "Suite", "cela continue") ;suite du script ;.... EndFunc ; Func gui2() Func gui2($iCancelStopsAll = 0) Local $iReturn = 0 ... Case $GUI_EVENT_CLOSE, $g_idButton4 If $iCancelStopsAll Then $iReturn = 1 ... Return $iReturn ; 0 or 1 EndFunc Note : if the GUI2 Close button [X] should react differently than the GUI2 Cancel button, then the Case should be splitted in 2 (one Case for $GUI_EVENT_CLOSE, another Case for $g_idButton4) Hope it makes sense... if this is what ermar asked for !
    2 points
  44. Hi @Gianni, Sorry for the late reply. First of all thank you for the nice words . Yes i noticed that, that's why my demo downloads an image instead. I'm not currently sure why it does not work. 🤷‍♂️ I seem to remember some documentation mentioning requirements like maximum response time and file size, but i cannot find that currently. It seems to be the case, when the app is not registered with the system. After adding the registry and registering the COM objects, activationType foreground also works. Again, not sure why, currently. This is a very cool tool for crafting toast UI, thanks Edit: I can see the tool might be available as open source on GitHub, so maybe I'll make an AutoIt version at some point, for fun Ah, thank you
    2 points
  45. See example in helpfile for _GDIPlus_TextureCreate()
    2 points
  46. InnI

    autoit error

    ByRef parameter cannot have default value. You must to use ByRef something like this $sOut = "" RunCmd("CmdLine", $sOut) ConsoleWrite($sOut & @CRLF) ; changed Func RunCmd($sCmd, ByRef $sOut) $sOut = "changed" EndFunc
    2 points
  47. ioa747

    autoit error

    From what I understand from the above, something is wrong on line 11, and it has to do with $sOut (probably has no value) Here it would help if you could show us your code so we can understand more.
    2 points
  48. Latest version! Works on AutoItObject methods now! A big shoutout to ioa747 too!
    2 points
  49. Instead of directly processing everything in AutoIt, I followed the examples from LarsJ in this Thread: Got everything working as I wanted.
    2 points
  50. I only had to use this once before but you need _WinAPI_GetFontResourceInfo() to read font name directly from a font file properties. Example: #include <WinAPIGdi.au3> Example() Func Example() Local $sFile = "C:\Windows\Fonts\segoeui.ttf" ConsoleWrite(_WinAPI_GetFontResourceInfo($sFile, True) & @CRLF) ConsoleWrite(@CRLF) FontGetInfoFromFile($sFile, 0, "Copyright") FontGetInfoFromFile($sFile, 1, "Font Family name") FontGetInfoFromFile($sFile, 2, "Font SubFamily name") FontGetInfoFromFile($sFile, 3, "Unique font identifier") FontGetInfoFromFile($sFile, 4, "Font full name") FontGetInfoFromFile($sFile, 5, "Version string") FontGetInfoFromFile($sFile, 6, "Postscript name") FontGetInfoFromFile($sFile, 7, "Trademark") FontGetInfoFromFile($sFile, 8, "Manufacturer Name") FontGetInfoFromFile($sFile, 9, "Designer") FontGetInfoFromFile($sFile, 10, "Description") FontGetInfoFromFile($sFile, 11, "URL Vendor") FontGetInfoFromFile($sFile, 16, "Preferred Family (Windows only)") FontGetInfoFromFile($sFile, 17, "Preferred SubFamily (Windows only)") FontGetInfoFromFile($sFile, 18, "Compatible Full (Mac OS only)") FontGetInfoFromFile($sFile, 19, "Sample text") FontGetInfoFromFile($sFile, 20, "PostScript CID findfont name") FontGetInfoFromFile($sFile, 256, "Font-specific names") EndFunc ;==>Example Func FontGetInfoFromFile($sFile, $n, $sElement) Local $s = _WinAPI_GetFontResourceInfo($sFile, Default, $n) If Not @error And $s Then ConsoleWrite($sElement & " = " & $s & @CRLF) EndFunc ;==>FontGetInfoFromFile
    2 points
×
×
  • Create New...