Forum Discussion
YMinaev
Staff
15 years agoHi,
WaitWinForms object accepts the native name of your object (the value from the name in the object tree - WinFormsObject("native name is here")). So, let's assume that you need to obtain an object named 'Sys.Process("app").WinFormsObject("form")'. In this case, your code will look like this:
In your case, it looks like you actually need to obtain the 'NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings' object (the name you pass to WaitWinFormsObject coincides with this name in Name Mapping).
You need to use the WaitNamedChild method to do this:
See the "Waiting for a Process or Window Activation" help topic to understand how Wait methods work.
WaitWinForms object accepts the native name of your object (the value from the name in the object tree - WinFormsObject("native name is here")). So, let's assume that you need to obtain an object named 'Sys.Process("app").WinFormsObject("form")'. In this case, your code will look like this:
...
Set obj = Sys.Process("app").WaitWinFormsObject("form", 10000)
If obj.Exists Then
' object was found
End If
...
In your case, it looks like you actually need to obtain the 'NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.PlatformSettings' object (the name you pass to WaitWinFormsObject coincides with this name in Name Mapping).
You need to use the WaitNamedChild method to do this:
...
Set obj = NameMapping.Sys.Metrino_Kernos_ControlPanels_PlatformSettings.WaitNamedChild("PlatformSettings", 10000)
If obj.Exists Then
' object was found
End If
...
See the "Waiting for a Process or Window Activation" help topic to understand how Wait methods work.