Modify

Opened 6 years ago

Closed 6 years ago

#2627 closed Bug (No Bug)

WinExists not working on Windows 8

Reported by: Daniel.Paquette@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: WinExists Cc:

Description

The following code works fine on windows 7 (32 and 64 bit), but fails on Windows 8 64 bit.

;Test for seeing if we can see notepad
;NotepadTest.au3
Opt("WinTitleMatchMode", 2)

DIM $CompletionWindowStr = "Untitled - Notepad"

$WaitCompleteResult = WinExists($CompletionWindowStr)
If ($WaitCompleteResult = 1) Then
	MsgBox(1,"Info", "Notepad found", 30)
Else
	MsgBox(1,"Info", "Notepad NOT found", 30)
EndIf

Exit

Test setup is open notepad, then run the above compiled program.
Under windows 7 notepad is found.
Under windows 8.0 it is not.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by anonymous

I found a workaround, here it is:
;Test for seeing if we can see notepad
;NotepadTest.au3
DIM $CompletionWindowStr = "Untitled - Notepad"
;$WaitCompleteResult = WinExists($CompletionWindowStr)
$WaitCompleteResult = WinExists("[CLASS:Notepad]")
If ($WaitCompleteResult = 1) Then

MsgBox(1,"Info", "Notepad found", 30)

Else

MsgBox(1,"Info", "Notepad NOT found", 30)

EndIf
Exit

comment:2 Changed 6 years ago by BrewManNH

Does the Notepad window have the same title as it did in previous versions of windows?

comment:3 Changed 6 years ago by Jon

Works fine here. Windows 8 x64.

comment:4 Changed 6 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

It is true that Win8 and 7 introduce a non-breaking blank in the title

"CLASS:Notepad" is better mainly when using non english windows

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.