on 07-04-2007 7:21 AM
Hi expert,
When i get ScreenTop property of a GuiMenu object, It raise an exception. Please help me know how can I get GuiMenu ScreenTop and what control i can get this property.
Thanks
Hi Thanh,
the GuiMenu does not support this property, even though it is mentioned in the type library. The reason is that the script will access the menu data only, not the rendered window. We will change the behaviour so that you receive a -1 result instead of an exception.
Thanks for reporting the problem.
Best regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Not only GuiMemu do no support control location property, there are some controls are the same behavior with GuiMenu control such as Matched code button, Combo Dropdown list, etc. I know the purpose of SAP scripting is support to automatic processing, e-Learning, I'm working on a e-learning system so i need to get control location properties so i can capture control image. Can you tell me SAP Scripting can support some properties as follow in future:
+Can FindByPosition function return the topmost and the leaf control at point, the current FindByPosition function has some problems:
-Do not return the top most control at point. That is I call this function when the mouse
point is pointed to menu control, dropdown list, Matched Code button, it return the
GuiMainWindow.
-Do not return the "leaf control". that is i call it when the mouse point is pointed to tree
control, just return the tree control, does not return the tree node. In menu bar
control, it does not return menu control, just return Menu bar control.
+Can Sap Scripting support control location property to any control that can render on screen.
Best Regards.
Thanh Ngo.
P/S
One more. Can you tell me there is any solution to resolve above problems? thanks a lot.
Hi Thanh,
I'm afraid some of these things will not be feasible, as they are beyond the scope of the API. The main focus of the API is on functional testing, so we do not cover all of the visual effects of SAP GUI. Also, FindByPosition will only find the controls as specified in the API document, but not inner objects of these controls such as tree nodes or Grid cells.
One thing that I'd expect to work is the button for the GuiCTextField controls. If this is not detected correctly then we might be able to fix it.
Best regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.