Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the location(x,y) of an highlighted item in WinList
#1
Solved: 10 Years, 8 Months, 1 Week ago
Hi All,

I have a WinList object and an item is highlighted by default.
I need to get the location of that highlighted item in WinList that can be in the form of x and y coordinates.

Input on this is appreciated.

sunny

Reply
#2
Solved: 10 Years, 8 Months, 1 Week ago
Hi,
Use GetRoProperty to get the cordinates
---.GetRoProperty("x")
---.GetRoProperty("y")

Regards,
Sankalp
Reply
#3
Solved: 10 Years, 8 Months, 1 Week ago
GetRoProperty("x") and GetRoProperty("y") gives the winlist box x and y coordinates.

I want the x and y coordinates for the highlighted item in the WinList, this highlighted item changes dynamically everytime

Sunny
Reply
#4
Solved: 10 Years, 8 Months, 1 Week ago
You can use the following function to accomodate your requirement.

Code:
Public Sub ClickOnTextLocation()
        l = -1
    t = -1
    r = -1
    b = -1
    
    rtn = SwfWindow("xyz").SwfObject("abc").GetTextLocation("pqr",l,t,r,b,True)
    
    myX = SwfWindow("xyz").SwfObject("abc").GetROProperty("x")
    myY = SwfWindow("xyz").SwfObject("abc").GetROProperty("y")
    x= (l+r)/2
    y=(t+b)/2
    
    myX = myX + x
    myY = myY + y
    SwfWindow("xyz").Activate
    Set dr = CreateObject("Mercury.DeviceReplay")
    
    dr.MouseClick myX, myY, 0

End Sub
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get URL/Location from Address bar of any open window in Windows 7 kalpmist 0 4,075 05-11-2015, 07:23 PM
Last Post: kalpmist
  Where is the location of Log files after installing SAP addin SaranKumarV 0 2,295 09-02-2010, 10:54 AM
Last Post: SaranKumarV
  Changing the Default location for test results when using Test Batch Runner tool pointguard888 3 10,170 12-29-2009, 04:31 PM
Last Post: pointguard888
Question Confirm that the specified item is included in the object's item collection. mugs 1 7,473 02-27-2009, 01:52 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)