Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making the macro more complex
#1
Hi all again.
That's the macro I mad and it works, but sometimes it doesn't work because the "target" changes his coordnates.

rep 50
Acc a=acc("" "LINK" " Internet Explorer" "Internet Explorer_Server" "" 0x1100 208 556)
str name=a.Name
_s=name; _s.setfile("D:\Documents and Settings\Administrator\My Documents\test.txt" -1 -1 1)
HtmlClick("BUTTON" "Apagar" "" " Internet Explorer" 0 4 0x21)
wait 5


My question is, how can I use IF and ELSE in case object not found? Something like: In case object not found look at this coordinates?

Thanks a lot

Massa
#2
When not found, generates error, yes? Then use err.

Code:
Copy      Help
Acc a
a=acc(...)
err
,a=acc(...)
,err
,,a=acc(...)
,,;and so on

But better don't use coordinates. If the object cannot be found by name, capture some adjacent object and use the Navigate field.
#3
I used "Regexp" - Character in range and it works very nice.
Thanks...

Massa


Forum Jump:


Users browsing this thread: 1 Guest(s)