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
#4
Solved: 10 Years, 8 Months, 3 Weeks 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


Messages In This Thread
RE: How to get the location(x,y) of an highlighted item in WinList - by Tarik Sheth - 01-11-2012, 05:18 PM

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,083 05-11-2015, 07:23 PM
Last Post: kalpmist
  Where is the location of Log files after installing SAP addin SaranKumarV 0 2,300 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,196 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,480 02-27-2009, 01:52 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)