Modify

Opened 6 years ago

Closed 6 years ago

#3780 closed Bug (Completed)

WinSetTitle reverts to default upon window focus on Notepad.exe >= Windows 19H1

Reported by: AndyS19a@… Owned by: J-Paul Mesnage
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:1 by J-Paul Mesnage, 6 years ago

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

comment:2 by J-Paul Mesnage, 6 years ago

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 J-Paul Mesnage, 6 years ago

Owner: set to J-Paul Mesnage
Status: newassigned

comment:4 by J-Paul Mesnage, 6 years ago

Summary: WinSetTitle reverts to default upon window focusWinSetTitle reverts to default upon window focus on Notepad.exe >= Windows 19H1

comment:5 by J-Paul Mesnage, 6 years ago

Milestone: 3.3.15.4
Resolution: Completed
Status: assignedclosed

Added by revision [12371] in version: 3.3.15.4

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.