Home › Forums › General XMetaL Discussion › Count Macro › Reply To: Count Macro
Reply to: Count Macro
February 10, 2009 at 7:02 pmThe only thing I can think of is that perhaps you have not specified the element name using the right text casing. With no SGML declaration file XMetaL defaults to all capitals for element names, so your script must also assume all capitals. It is easy to check this by simply looking at the name of the element you are trying to find in TagsOn view. If it appears as
I've tested this and it works for SGML for both regular and empty elements so that isn't the issue. In your case it might be as simple as using this instead:
//XMetaL Script Language JScript:
Selection.MoveToElement(“COC”);