Forum Discussion

Stan's avatar
Stan
Occasional Contributor
12 years ago

Treating Mapped Name as Unexpected Window

Hello!



This piece of File Download dialog worked well when called multiple times earlier, but now for the first time it works but then after the same is handled in the GeneralEvents_OnUnexpectedWindow handler, and closed as in code below



  Log.Picture window.Picture, "Unexpected Window - " & window.Name

  if window.Exists then window.Close



Identified with WndClass and wndCaption : #32770 & File Download, also tried adding index and even included ExtendedFind. What and where could the wrong be?



Thanks,

Stanley

1 Reply

  • Hi,



    Can you clarify what is the problem with this code and how is it related to Name Mapping? Object identification is not needed inside the OnUnexpectedWindow handler because the window which caused this event is already referenced via the handler's Window parameter.



    If you mean that you need to see the mapped name instead of the 'Window(...)' name in the log, use the MappedName property in the Log.Picture call instead of Name.