I have a window with two buttons that I would like to klick. But they have no name. Is it possible to "adress" a button by its position or window handle instead of its name?
"View system windows" snipet:
...
67058 - SysDateTimePick32 ""
67060 - Button ""
67062 - Button ""
Dont work:
Let>WIN_USEHANDLE=1
MouseOver>Edit new,67062
Works:
SetControlText>Edit new,Button,2,Hello
MouseOver>Edit new,Hello
Klick a button with no name.
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
Probably the easiest thing is to use MouseMoveRel> and a LCLICK.
Get the coordinates of the button within the window then use MouseMoveRel> and the X,Y coordinates that are "relative" to the window. Using MouseMoveRel> rather than MouseMove> prevents problems when the window is not located in exactly the same position each time.
It might also be possible to acquire the handle of the button objects and move to their locations based on coordinates obtained using GetWindowPos>. This is a more drawn out process so if you can use predefined coordinates it is much simpler.
Get the coordinates of the button within the window then use MouseMoveRel> and the X,Y coordinates that are "relative" to the window. Using MouseMoveRel> rather than MouseMove> prevents problems when the window is not located in exactly the same position each time.
It might also be possible to acquire the handle of the button objects and move to their locations based on coordinates obtained using GetWindowPos>. This is a more drawn out process so if you can use predefined coordinates it is much simpler.