in reply to Mouseclick in Application
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:
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.
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mouseclick in Application
by Anonymous Monk on Oct 21, 2010 at 00:20 UTC |