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!
geokonAsked:
Who is Participating?
 
_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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.