Differences GetTextAtPoint on win7 and XP. And a wishlist

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Dick99999
Pro Scripter
Posts: 84
Joined: Thu Nov 27, 2008 10:25 am
Location: Netherlands

Differences GetTextAtPoint on win7 and XP. And a wishlist

Post by Dick99999 » Thu Aug 26, 2010 7:33 am

Just wanted to report two differences/solutions I had on windows 7.

1. On win XP my GetTextAtPoint executes as expected. On windows 7 it gave no result o the same form (result offset -1). As suggested in the manual, I had to use GetTextReset on win7 to make it working.
2. The second difference might not be MSC related. The relative coordinates of the fields within the form window were off by -5 points (Y-direction)

Using win7 32-bit,d MSC 12.0.6/12.0.7 and compiled scripts.

My wish list item is that there is a GetTextAtPoint with relative coordinates within a window. Now I have to calculate those. First get the the window position, then lock input, calculate the screen X and Y of the field and finally use GetTextAtPoint (and release lock input).

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 26, 2010 9:16 am

Don't know why you had to explicitly reload the libs with GetTextReset but I recommend doing it anyway as a matter of course, regardless of the operating system. It does no harm.

Your second point is probably due to the different styles between XP and Windows 7 - with the window borders being a different size the relative coordinates would be different. If you modify your theme and make the window border larger then clearly the coordinates will vary again.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Aug 26, 2010 12:34 pm

Dick wrote:2. The second difference might not be MSC related. The relative coordinates of the fields within the form window were off by -5 points (Y-direction)
Marcus wrote:Your second point is probably due to the different styles between XP and Windows 7 - with the window borders being a different size the relative coordinates would be different. If you modify your theme and make the window border larger then clearly the coordinates will vary again.
Look HERE

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts