Remove line breaks

Hi,

I want to remove all the line breaks from many files with TextWrangler.

I tried with the next script but doesn’t work.


tell application "TextWrangler"
	activate
	repeat with aFile in filesArray
		set docName to name of (open aFile)
		tell document docName
			-- Set the document text to just the lines which need to be kept.
			set its text to copied lines of (process lines containing matching string "(</id>|<name>|</name>)" with matching with grep)
			-- Remove line breaks
			remove line breaks text of text document
			-- Save and close the document.
			close saving yes
			-- Ensure the document's gone before opening another.
			repeat while (it exists)
				delay 0.2
			end repeat
		end tell
	end repeat
end tell

Appreciate any help. Thank you in advance.

Model: mac mini 2011
AppleScript: 2.6.1
Browser: Safari 537.36
Operating System: Mac OS X (10.9)

If I understand well you must replace the instruction

 remove line breaks text of text document

by

remove line breaks of its text

Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 16 février 2017 11:01:59

Yvan, thank you very much!

That’s exactly what I wanted.

thank you, again.

Thanks for the feedback.

Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 16 février 2017 15:14:20