Modify ↓
#3780 closed Bug (Completed)
WinSetTitle reverts to default upon window focus on Notepad.exe >= Windows 19H1
| Reported by: | Owned by: | Jpm | |
|---|---|---|---|
| Milestone: | 3.3.15.4 | Component: | AutoIt |
| Version: | 3.3.14.5 | Severity: | None |
| Keywords: | WinSetTitle | Cc: |
Description
I have a function that opens Notepad and sets its window title. However, the title reverts to whatever its default was when the Notepad window gets focus. To reproduce, run the WinSetTitle.au3 in the Examples folder, then move the cursor before the timeout expires.
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Set the title of the Notepad window using the handle returned by WinWait.
WinSetTitle($hWnd, "", "New Notepad Title - AutoIt")
; Wait for 2 seconds to display the Notepad window and the new title.
Sleep(2000)
; Close the Notepad window using the handle returned by WinWait.
WinClose($hWnd)
EndFunc ;==>Example
Attachments (0)
Change History (5)
comment:2 by , on Aug 18, 2020 at 12:27:19 PM
That's a change introduce with the notepad.exe in windows 19h1.
For other exe"s as explorer.exe, write.exe it is OK.
Perhaps I will change the WinSetTitle example to go around this new behavior of notepad.exe
comment:3 by , on Aug 18, 2020 at 12:27:47 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:4 by , on Aug 18, 2020 at 12:41:27 PM
| Summary: | WinSetTitle reverts to default upon window focus → WinSetTitle reverts to default upon window focus on Notepad.exe >= Windows 19H1 |
|---|
comment:5 by , on Aug 18, 2020 at 1:04:47 PM
| Milestone: | → 3.3.15.4 |
|---|---|
| Resolution: | → Completed |
| Status: | assigned → closed |
Added by revision [12371] in version: 3.3.15.4
Note:
See TracTickets
for help on using tickets.

I confirm that under Windows 10 2004 I reproduce the pb.
Can somebody test on other version of Windows?
Thanks