DblClick failing because point is out of bounds??
Hmm, I'm having an interesting problem trying to double-click on a control in our desktop application. The problem is the DblClick (double-click) action fails and the log reports that is because the specified point is out of bounds. However, I added a HoverMouse in the preceding line to debug the problem. It has no problem hovering the mouse in the correct position using the exact same coordinates. The control is a grid and I'm trying to double-click on the right border of one of the header cells.
The log entry for the hover shows: Hover at point (453, 83).
Here are related screen captures and the code:
Set o_colHdr = <A valid alias for the header cell is here>
i_Width = o_colHdr.Width
i_Height = o_colHdr.Height
x = i_Width
y = i_Height/2
o_colHdr.HoverMouse x, y 'This works like a champ
o_colHdr.DblClick x, y 'This fails miserably
Ideas? Am I missing something obvious here?
I've taken a different approach and it's working. Since the hover is in the correct position, I get the screen coordinates of the mouse cursor at that point. Then I double-click on the screen coordinates relative to the application rather than the column header object. That's double clicking in the desired place.
Set o_colHdr = <Alias to column header here> i_Width = o_colHdr.Width i_Height = o_colHdr.Height x = i_Width y = i_Height/2 o_colHdr.HoverMouse x, y x = Sys.Desktop.MouseX y = Sys.Desktop.MouseY Aliases.Sys.Ezp.Session.DblClick x, yI think the original problem is probably a bug with the DblClick method. Something with coordinates relative to an object vs. the screen. However, rather than pursuing that with support I'll go with my workaround.
Thanks for all your feedback.