Forum Discussion
ArmandsBruns
12 years agoFrequent Contributor
Hi Tanya,
Thanks for your reply.
I mean that after each "click" would be possible to save a picture in my function ?
------------------------------------------------
Function IfObjectExists(location, typeID, name)
IfObjectExists = False
Sys.Refresh()
location.RefreshMappingInfo
Do
counter = counter + 1
Sys.Refresh()
location.RefreshMappingInfo
If(location.FindChild( typeID, name,30).Exists <> Empty ) Then
IfObjectExists = True
log.Message("Find this object - '"+typeID+"', '"+name+"' - and click!")
object = location.FindAllChildren(typeID, name, 20000, True)
For i = 0 to UBound(object)
If object(i).Exists and object(i).Visible=True Then
object(i).Click
Call Save_Picture(name)
log.message("click to object")
Next
Log.Message "Find: " & (UBound(object) + 1)
Call location.Wait
Else
IfObjectExists = False
aqUtils.Delay(2000)
Sys.Refresh()
location.RefreshMappingInfo
log.Message ("Doesn't find this objects: '"+typeID+"', '"+name+"'")
End If
Loop Until IfObjectExists = True or counter > 25
End Function
------------------------------------------------
Sub Save_Picture(name)
Set pict = Sys.Desktop.Picture()
Call Log.Picture(pict, name)
End Sub
------------------------------------------------
Besr Regards
Armands
Thanks for your reply.
I mean that after each "click" would be possible to save a picture in my function ?
------------------------------------------------
Function IfObjectExists(location, typeID, name)
IfObjectExists = False
Sys.Refresh()
location.RefreshMappingInfo
Do
counter = counter + 1
Sys.Refresh()
location.RefreshMappingInfo
If(location.FindChild( typeID, name,30).Exists <> Empty ) Then
IfObjectExists = True
log.Message("Find this object - '"+typeID+"', '"+name+"' - and click!")
object = location.FindAllChildren(typeID, name, 20000, True)
For i = 0 to UBound(object)
If object(i).Exists and object(i).Visible=True Then
object(i).Click
Call Save_Picture(name)
log.message("click to object")
Next
Log.Message "Find: " & (UBound(object) + 1)
Call location.Wait
Else
IfObjectExists = False
aqUtils.Delay(2000)
Sys.Refresh()
location.RefreshMappingInfo
log.Message ("Doesn't find this objects: '"+typeID+"', '"+name+"'")
End If
Loop Until IfObjectExists = True or counter > 25
End Function
------------------------------------------------
Sub Save_Picture(name)
Set pict = Sys.Desktop.Picture()
Call Log.Picture(pict, name)
End Sub
------------------------------------------------
Besr Regards
Armands
Related Content
- 2 months agoNicolaFilosa_SE