Clip to Prepare Clips for Posting on this Site

When we prepare clips, we need to do a little work to get them ready. Quotes often turn into smart quotes. That appears to be an issue with our posting software. Sometimes it does and sometimes it doesn’t add smart quotes. It also chokes often because it mistakes the greater than and less than signs for example as html tags. Because of that we need to prepare a clip before posting it.

Here is a first try at a clip we can use to prepare a clip for posting:
;make sure we aren't wrapped
^!SetWordWrap Off
;fix problem caused if clip actually
;contains " in it
^!Replace """ >> "|*and_quote*|" ACIWS
;convert quotes and other characters to html
^!Keyboard ALT+M &10 R &10 A
^!Replace """ >> """ ATIWS
;undo the original " characters
^!Replace "|*and_quote*|" >> """ ACIWS
;count lines and insert number of lines
^!Jump Doc_End
^!Keyboard ENTER
^!InsertText ;line number ^$GetLineCount$
^!ToolBar Copy All
;line number 16

Leave a Reply

Recent Posts

Archives

Topics