Vocola.net
Vocola 3.1 Function Library
MoveTo(dx, dy, rectangleName)
Namespaces LibraryPointer ► MoveTo
Move the pointer to a new position, relative to a corner of the specified rectangle.
Syntax
MoveTo(dx, dy, rectangleName)
Parameters
dx
Horizontal offset in pixels from edge of specified rectangle. A positive number means the offset is relative to the left edge, while a negative number means the offset is relative to the right edge.
dy
Vertical offset in pixels from edge of specified rectangle. A positive number means the offset is relative to the top edge, while a negative number means the offset is relative to the bottom edge.
rectangleName
Name of rectangle from whose nearest corner dx and dy should be measured. Case insensitive. Choices:
  • Window - Current window's bounding rectangle, as with MoveTo(dx,dy).
  • WindowInner - Current window's inner rectangle (or "client area"), i.e., the part not occupied by the title bar, toolbars, etc.
  • Screen - Screen's bounding rectangle.
  • ScreenInner - Screen's inner rectangle (or "work area"), i.e., the part not occupied by the taskbar, docked windows, etc.
  • Screen2 - Bounding rectangle of a second screen, if present. Additional screens, if present, may be similarly referenced by number.
  • ScreenInner2 - Inner rectangle of a second screen, if present. Additional screens, if present, may be similarly referenced by number.
Remarks
Using pixel coordinates to position the pointer is not the best way to control an application, but sometimes it's the only way.
Examples
CopyCopy full pathname in Visual Studio
Copy File Name = MoveTo(5, 100, WindowInner) {RightButton}{Down_4} Wait(500) {Enter};
Visual Studio has no easy way to copy the full pathname of the current document by voice. But if you right-click on the little triangular cutout to the left of the leftmost tab you get a context menu with a "Copy Full Path" option. This command does that, by calling MoveTo(5, 100, WindowInner) to position the pointer over the cutout (you may need to adjust the coordinates) and sending keystrokes to choose the menu option.
See Also

Assembly: VocolaFunctionLibrary (Module: VocolaFunctionLibrary) Version: 3.1.1.0 (3.1.1.0)