Locate object using SystemWindows info

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Locate object using SystemWindows info

Post by Jerry Thomas » Tue Jan 04, 2011 5:40 pm

We have several languages of our software and I am trying to automate processes and testing.

When I look in System Windows at dialog titles I see entries like this:
- 786918 - TReSizeForm "Größe der ausgew. Elemente ändern"

I can count on "TReSizeForm" being part of the Window identifier (but not part of the visible title) for any language. (The dialog is the ReSize Form)

Is there any way use this hidden label to get window position, etc?

I have looked at GetWindowList, GetWindowHandle, GetWindowProcess and it doesn't seem possible.
Thanks,
Jerry

[email protected]

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Post by Jerry Thomas » Tue Jan 04, 2011 6:42 pm

Actually I can answer my own question...


(corrected code snippet)

Code: Select all

// Get Window list as a list of handles rather than text
Let>WIN_USEHANDLE=1
GetWindowList>winList
Separate>winList,CRLF,winArr
Let>WinCnt=winArr_Count

Let>cnt=1

While>cnt<=WinCnt
//Check each Class to see if it's the one I need
  GetWindowNames>winArr_%cnt%,winTitle,winClass
  If>winClass=TReSizeForm
    SetFocus>winTitle
    Let>cnt=1000
  Endif
  Let>cnt=cnt+1
EndWhile
Thanks,
Jerry

[email protected]

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