Modify

Opened 12 years ago

Closed 12 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 by anonymous, 12 years ago

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 by BrewManNH, 12 years ago

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

comment:3 by Jon, 12 years ago

Works fine here. Windows 8 x64.

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

Resolution: No Bug
Status: newclosed

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

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


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