Modify

Opened 4 years ago

Closed 4 years ago

#3780 closed Bug (Completed)

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

Reported by: AndyS19a@… 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:1 Changed 4 years ago by Jpm

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

comment:2 Changed 4 years ago by Jpm

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 Changed 4 years ago by Jpm

  • Owner set to Jpm
  • Status changed from new to assigned

comment:4 Changed 4 years ago by Jpm

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

comment:5 Changed 4 years ago by Jpm

  • Milestone set to 3.3.15.4
  • Resolution set to Completed
  • Status changed from assigned to closed

Added by revision [12371] in version: 3.3.15.4

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.