I borrowed this code and want to use it to click the open button, instead of Save. I don't work with coordinates much, so I'm at a loss as to how this picks the save button
objWidth = WinObject("nativeclass:=DirectUIHWND","regexpwndcl ***:=DirectUIHWND", "index:=0").GetROProperty("width")
savebtnY = 61
savebtnX = objWidth - 100
If objWidth < 329 Then
Browser("creationtime:=0").FullScreen 'or rezise the browser window to show the appropriate coordinates are visible
'This will click the save button only
Browser("creationtime:=0").WinObject("nativeclass: =DirectUIHWND","regexpwndclass:=DirectUIHWND", "index:=0").Click savebtnX - 20, savebtnY
I'll attach a screen shot.
Patience is like bread I say.... I ran out of that yesterday.
Hopefully not, x/y coordinate clicks are a last ditch resort when you can't identify something any other way. They are high maintenance and get affected by different screen resolutions and the slightest ui change.
As I don want to use X,Y Co-Ordinates I tried with a secret method of QTP "ClickOnText" in Win7.As we know Recogintion in Win7 will happen only with OCR this method is not performing as exected.I tried changing the registry code to recognize "First API and then OCR" but It did not help me out.I read somewhere that we can create INI file to identify the object perfectly.Is that anybody aware of it.