﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2899	"WinGetHandle(""LAST"") : document unclear and @error bug"	anonymous	Jon	"The documentation state that 
{{{
WinGetHandle(""[LAST]"")
}}}
should return ""Last window used in a previous AutoIt command"" (in ""Window Titles and Text"" section), and (in ""WinGetHandle"" section) ""sets the @error flag to non-zero if the window is not found.""

{{{
GUICreate(""Test"")
GUISetBkColor(0x0)
GUISetState()
;Local $hWin = WinGetHandle(""[ACTIVE]"")
;WinMove($hWin, """", 0, 0)

Local $hWin1 = WinGetHandle(""[LAST]"")
ConsoleWrite($hWin1 & ' - ' & @error  & ' - '& VarGetType($hWin1))
Sleep(2000)
}}}
First, the documentation do not say that it's only return the window which is processed with only '''Win...()''' function but not '''GUI...()''' function. This can make people misunderstood.
Second, when no previous window is found, it NOT set @error at all. In the example above, it return a pointer with value 0, and @error also set to 0.
"	Bug	closed	3.3.15.0	AutoIt	3.3.12.0	None	Fixed		
