Forum Discussion
NisHera
10 years agoValued Contributor
below is a fucntion I'm using in similer situations, written in JSscript
Please modify according to your situation
function clickPic(){
var StordedPic, WinPicObj, YourWindow, RectHandle;
StordedPic =Utils.Picture;
StordedPic.LoadFromFile("C:\\.....\\MyButton.PNG");
Log.Picture(StordedPic);
YourWindow = Aliases.Application.....ParentObject //this is an object which Object Spy could read
WinPicObj = YourWindow.Picture(0,0,-1,-1,false);
Log.Picture(WinPicObj);
RectHandle = WinPicObj.Find(StordedPic,0,0,false,Z,false,100); //Z should replace with a value =>0
Log.Message(RectHandle.Top+" "+RectHandle.Left+" "+RectHandle.Bottom+" "+RectHandle.Right);
YourWindow.Click(RectHandle.Left+5,RectHandle.Top+5,0);
}
Related Content
- 10 years ago
- 10 years ago
Recent Discussions
- 4 days ago
- 4 days ago