Home › Forums › General XMetaL Discussion › Count Macro › Reply To: Count Macro
Reply to: Count Macro
February 5, 2009 at 9:22 pmPaste this into your document (all three lines):
[code]
//XMetaL Script Language JScript:
var nodelist = ActiveDocument.getElementsByTagName(“coc”);
ActiveDocument.Host.Alert(nodelist.length);
[/code]
The 2nd-3rd lines are the actual script, which you could put into a macro if you wish.
The first line is a little bit of XMetaL magic that allows you to run script code quickly by pasting it into the active document.