Reply to: how do i iterate a documentMarch 20, 2014 at 1:36 am
Please have a look at the XMetaL Developer Programmers Guide documentation for this API as it contains some useful information that will help here.
Essentially this API returns a boolean value set to true/false when it finds/does not find what you are asking it to locate. So, your script logic can include something similar to the following:
[code]//XMetaL Script Language JScript:
Application.Alert(“unable to find it”);
Hopefully you can integrate that type of logic into your script.
Aside: I'm not sure why your script uses both Selection and Range objects, but it is a script snippet after all and you don't show how you are setting up the Range or subsequent usage of it. Maybe there is a good reason for that.