[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 497
  • Last Modified:

WHS, VBS, JS: Getting coordinates of active window and issuing mouseclick event on offset coordinate

Hello,

Is it possible to retrieve the x,y (or top, left) coordinates of an open window / program via VBS / JS / WSH?

Is it possible to send a "mouseclick" in the same way as you can send keystrokes via the Sendkeys method (WSH)?

I am interested in getting the coordinates of an open application and then send a mouseclick on some coordinates that are offset compared to the x,y / top, left coordinates of the application.

Thank you for any ideas!
0
geokon
Asked:
geokon
1 Solution
 
_lv_Commented:
If you are familiar with Windows API programming, then you can do it using
DynamicWrapper:
http://ourworld.compuserve.com/homepages/Guenter_Born/WSHBazaar/WSHDynaCall.htm

and GetActiveWindow, GetWindowRect API functions.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now