-- $NWCUT$CONFIG: FileText $ nwcut.setlevel(2) nwcut.status = nwcut.const.rc_Succes --nwcut.status = nwcut.const.rc_Report local progname = 'change_collapse_color' local HelpMsg = [[ This tool changes the color of items in a collapse boundery ]] -------------------------------------- -- Main processing ------------------- -------------------------------------- assert(nwcut.getprop('Mode') == nwcut.const.mode_FileText, "Input type must be 'File Text'") assert(nwcut.getprop('ReturnMode') == nwcut.const.mode_FileText, "Under 'Options', check 'Returns File Text'") collapse_color = nwcut.prompt("collapse_color N ", "#",0,5) collapse = 0 for item in nwcut.items() do if item:Is('AddStaff') then collapse = 0 end--if if collapse == 1 then item.Opts.Color = collapse_color ; end--if if item:Is('Boundary') then if item.Opts.Style == 'Collapse' then collapse = 1 end--if if item.Opts.Style == 'EndCollapse' then collapse = 0 end--if end--if nwcut.writeline(item) end--for