Option Explicit ' rg_ColMMR.vbs Ver 1.00, Rick G. ' Reference: http://my.noteworthysoftware.com/?topic=8564.0 ' Prompt: ' Input Type: File Text ' a few PHP defines from nwc2clips.inc: Const NWC2_STARTFILETXT = "!NoteWorthyComposer" Const NWC2_STARTCLIP = "!NoteWorthyComposerClip" Const NWC2_ENDCLIP = "!NoteWorthyComposerClip-End" Dim s Do Until WScript.StdIn.AtEndOfStream s = WScript.StdIn.ReadLine If InStr(s, NWC2_STARTFILETXT & "(") = 1 Then Exit Do If s = NWC2_ENDCLIP Then WScript.StdErr.WriteLine " Tool requires Input Type: File Text" WScript.Quit End If Loop s = Replace(Replace(s, NWC2_STARTFILETXT, NWC2_STARTCLIP), ")", ",Single)") With WScript.StdOut .WriteLine s ' the header .WriteLine "|Boundary|Style:Collapse" .WriteLine "|Bar" .WriteLine "|RestMultiBar|NumBars:" & WScript.Arguments(0) .WriteLine "|Bar" .WriteLine "|Boundary|Style:EndCollapse" .WriteLine NWC2_ENDCLIP 'the footer End With