Leaderboard
Popular Content
Showing content with the highest reputation on 07/17/2025 in all areas
-
Added an example how to play a webp animation on the desktop background behind the icons -> WebP See WebP Example14.au3. You need beside the appropriate _WebP_x??.dll also "Rostislav Uzunov Animation 480x270@30FPS.webp". Exit of the script only from the taskbar yet. It is very CPU intensive.2 points
-
Need help removing line from dark mode menubar
WildByDesign and one other reacted to ahmet for a topic
Here is initial version. Coordinates are wrong. I need to do other things now. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPITheme.au3> #include "GUIDarkMode_v0.02mod.au3" #include "ModernMenuRaw.au3" #include <GuiMenu.au3> #include <Array.au3> #include <WinAPIDiag.au3> #include <WinAPIConv.au3> #include <WinAPIGdiDC.au3> DllCall("User32.dll", "bool", "SetProcessDpiAwarenessContext", "HWND", "DPI_AWARENESS_CONTEXT" - 4) _SetMenuBkColor(0x202020) _SetMenuIconBkColor(0x202020) _SetMenuIconBkGrdColor(0x202020) _SetMenuSelectBkColor(0x202020) _SetMenuSelectRectColor(0x202020) _SetMenuSelectTextColor(0xFFFFFF) _SetMenuTextColor(0xFFFFFF) Example() Func Example() $hGUI = GUICreate("My GUI", 300, 200) ;Local $idFileMenu = GUICtrlCreateMenu("&File") Local $idFileMenu = _GUICtrlCreateODTopMenu("&File", $hGUI) GUICtrlCreateMenuItem("&Open", $idFileMenu) GUICtrlCreateMenuItem("&Save", $idFileMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idOptionsMenu = GUICtrlCreateMenu("O&ptions", $idFileMenu) GUICtrlCreateMenuItem("View", $idOptionsMenu) GUICtrlCreateMenuItem("", $idOptionsMenu) GUICtrlCreateMenuItem("Tools", $idOptionsMenu) GUICtrlCreateMenuItem("", $idFileMenu) Local $idExitItem = GUICtrlCreateMenuItem("&Exit", $idFileMenu) ;Local $idHelpMenu = GUICtrlCreateMenu("&?") Local $idHelpMenu = _GUICtrlCreateODTopMenu("&?", $hGUI) Local $idAboutItem = GUICtrlCreateMenuItem("&About", $idHelpMenu) Local $idEndBtn = GUICtrlCreateButton("End", 110, 140, 70, 20) GuiDarkmodeApply($hGUI) GUISetState(@SW_SHOW) $aMenuBarInfo = _GUICtrlMenu_GetMenuBarInfo($hGUI, 0, 1) _ArrayDisplay($aMenuBarInfo) $rcClient = _WinAPI_GetClientRect($hGUI) _WinAPI_DisplayStruct($rcClient, $tagRECT,"rcClinet before") ;CHAT GPT Local $aCall = DllCall("user32.dll", "int", "MapWindowPoints", _ "hwnd", $hGUI, _ ; hWndFrom "hwnd", 0, _ ; hWndTo "ptr", DllStructGetPtr($rcClient), _ "uint", 2) ;number of points - 2 for RECT structure If @error Then MsgBox($MB_ICONERROR, "Error", @error) Exit EndIf _WinAPI_DisplayStruct($rcClient, $tagRECT,"rcClinet after") $rcWindow = _WinAPI_GetWindowRect($hGUI) _WinAPI_OffsetRect($rcClient, -$rcWindow.left, -$rcWindow.top) $rcAnnoyingLine = DllStructCreate($tagRECT) $rcAnnoyingLine.left = $rcClient.left $rcAnnoyingLine.top = $rcClient.top $rcAnnoyingLine.right = $rcClient.right $rcAnnoyingLine.bottom = $rcClient.bottom ;~ _WinAPI_DisplayStruct($rcAnnoyingLine, $tagRECT) $rcAnnoyingLine.bottom = $rcAnnoyingLine.top $rcAnnoyingLine.top = $rcAnnoyingLine.top - 1 ;~ _WinAPI_DisplayStruct($rcAnnoyingLine, $tagRECT,"annoying line") $hDC = _WinAPI_GetDC($hGUI) $hSolidBrush=_WinAPI_CreateBrushIndirect($BS_SOLID, 0xFF00FF) _WinAPI_FillRect($hDC, $rcAnnoyingLine, $hSolidBrush) _WinAPI_ReleaseDC($hGUI, $hDC) _WinAPI_DisplayStruct($rcAnnoyingLine, $tagRECT,"annoying line") Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() Switch $idMsg Case $idExitItem, $idEndBtn, $GUI_EVENT_CLOSE _WinAPI_DeleteObject($hSolidBrush) ExitLoop Case $idAboutItem MsgBox($MB_SYSTEMMODAL, "About...", "Colored menu sample") EndSwitch WEnd EndFunc ;==>Example2 points -
Need help removing line from dark mode menubar
argumentum reacted to WildByDesign for a topic
Thank you for the heads up. That reminds me that I should probably start testing the beta version as well. I did briefly check over the release notes a few days ago and there is a lot of nice changes in there.1 point -
Need help removing line from dark mode menubar
WildByDesign reacted to argumentum for a topic
For the next version ( now in public beta ) you'll need to change this: ; #CONSTANTS# =================================================================================================================== If Not IsDeclared("DWMWA_USE_IMMERSIVE_DARK_MODE") Then Global Const $DWMWA_USE_IMMERSIVE_DARK_MODE = (@OSBuild <= 18985) ? 19 : 20 ; before this build set to 19, otherwise set to 20, no thanks Windaube to document anything ?? ; ===============================================================================================================================1 point -
Running script at startup on Windows 11?
argumentum reacted to Xichael for a topic
Thanks for the cmd tip, rudi.. ended up just adding cmd /c start "" to the beginning of the shortcut target to have it launch from a briefly appearing cmd window, and it's working great: cmd /c start "" C:\Path\To\Script.au3 Good to know about the registry option too, subz. Might use that.1 point -
The Problem is in File Explorer Window Title Length Limitation (for me 96 char) The issue you're facing isn't with the path itself, but with the File Explorer window's title bar. When a folder path is long, the Explorer window often truncates its title. This makes it difficult for AutoIt's WinWait or WinWaitActive functions to correctly identify the window, as they rely on matching the exact (or at least a sufficiently long part of the) window title. you need to change your approach suggested solution Func LaunchFirst() Local $sSrcPath = "F:\SMS\Lesson Manual\6 Staff Notation\Staff Notation\2 Pitch Location\1 Visual Representation #1" ; ----------------------------------------------- ShellExecute($sSrcPath) Local $hWnd = WinWaitActive("[CLASS:CabinetWClass; TITLE:" & StringLeft($sSrcPath, 90) & "]", "", 3) If $hWnd Then WinMove($hWnd, "", 1400, 10, 500, 440) EndFunc ;==>LaunchFirst1 point
-
Technically, it can be launched separately without geckodriver, but the correct parameters need to be utilized so that it behaves the same as when launched via the webdriver. I don't remember the exact parameters, but I used to do this so I know it is possible. I think a search of the forum (and maybe the wiki) would provide the information.1 point
-
Short story: The existing instance of firefox must be run via gecko driver. Gecko driver can be run via ShellExecute().1 point
-
Another AutoIt extension for Visual Studio Code
SOLVE-SMART reacted to genius257 for a topic
1.8.6 released! Only one change, the help box that appears when writing function parameters should not dissapear, when adding "," anymore. It took me a while and the solution is not perfect, but it should be better than the previous experience1 point -
How to change background and text colors of another app
ahmet reacted to WildByDesign for a topic
Yes, for sure. I am not at my PC right now but will share later. Although the code isn’t too special. I just used SetSysColors to change colors followed by restoring the original system colors when the script exits. This affects all apps though which is not what I originally wanted. I was hoping to target each app individually at execution time. But I was not successful with any of my attempts. SetSysColors is system-wide but only affects the current session so it is not permanent.0 points