Opened 9 years ago

Closed 9 years ago

#2899 closed Bug (Fixed)

WinGetHandle("LAST") : document unclear and @error bug

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


The documentation state that


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."

;Local $hWin = WinGetHandle("[ACTIVE]")
;WinMove($hWin, "", 0, 0)

Local $hWin1 = WinGetHandle("[LAST]")
ConsoleWrite($hWin1 & ' - ' & @error  & ' - '& VarGetType($hWin1))

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.

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [11407] in version:

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

as closed The owner will remain Jon.

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

Note: See TracTickets for help on using tickets.