Let me say up front. It will be very difficult to help you with this as we cannot see or test the application you are using. And even if we could, we probably have different resolution screens etc. which makes comparing absolute or relative coordinates impossible.
That said, Are you sure you want SendMouse("{ABS125,221}");? There are couple of reasons why this may be wrong:
- ABS means "absolute coordinates". Ie. relative to the screen, not the application window.
Windows and dialogs tend to pop-up in different positions on the screen each time they run. You might find that you need to use {RELx,y}--and adjust the numbers to suite--in order to account for this.
- Windows tends to use Device Independent Pixels(DIPs) (also sometimes known as "Window Coordinates") for mouse messages.
If the tool you are using to measure the position, is operating in display pixel units, that might be why you are being unsuccessful. You might need to use MouseMoveAbsPix() to account for this.
(But that doesn't allow you to compensate for variable window/dialog positions!)
Another possibility that might work for you, is to avoid using SendMouse() at all. Most mouse actions in most GUIs have a keyboard shortcut that is "position independant". Using them, where available, can make automation much simpler.
You appear to have taken great pains to manoeuvre the input caret to the control or field of interest. Having done so, you will often find that hitting the spacebar will have the same affect as clicking with the mouse. Hence replacing
SendMouse('{ABSx,y}');
SendMouse('LeftClick');
with the simpler, position independent SendKey('SPC');
Might achieve the desired affect.
Another useful one is replacing SendMouse('{RightClick'}; with SendKey('APP'}; to invoke context menus.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|