Page 1 of 1

Macros/Macro Creation/"Text Editing" a created mac

Posted: Fri May 04, 2001 4:11 pm
by Geoffrey Kidd
I want to create an HTML-character->International Character
macro which will go through a file and systematically
replace "Ü" with "Ü", and so forth for EVERY international
character in the standard HTML set. None of the macros in the
downloads section at textpad.com seems to do this, at least,
judging from the descriptions.

However, the ONLY way I know to create such a macro is to
systematically record the "Replace" for each character, and
that's a lot of characters. Also, make one little mistake and
it's start over from the beginning time.

Any way to create a macro just by entering commands such as
c/Ü/Ü/, the way I do in the SQL editor I use at work?

Thanks.

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Fri May 04, 2001 8:30 pm
by Jeff Epstein
This is truly one of the biggest problems that arise with uneditable macros. I might recommend using another program, or even writing your own. Perl, Java, ...?

Does anyone know of existing programs (either coded by you, or commercial software) that can approach this type of problem?

:' (
Jeff
http://www.jeffyjeffy.com/textpad

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Tue May 08, 2001 12:20 pm
by Roy Beatty
For HTML related functions, evaluate NoteTab Pro -- http://www.notetab.com.

I own full licenses to both. Aside from HTML-specific functions, TextPad is more robust, has a clearer user interface, and is the editor I use far more often. As I said to Jeff over lunch at the first TextPad Fan Club meeting, Textpad gives me a better understanding of how an object-oriented UI *should* behave.

What higher compliment can I pay?

Roy Beatty

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Tue May 08, 2001 12:22 pm
by Jeff Epstein
Here here :')

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Fri May 11, 2001 11:09 pm
by Jacob Carpenter
Well, as mentioned, Perl is a beautiful way to process text. In fact, if you want to convert all the hi-ascii numeric entities to their equivalent characters you simply need to:

perl -pe "s{&#([192-255]+);}{print chr($1);''}ge" <filename>

Obviously it gets a little more complex with real HTML character entities (I smell a hash).

hope this is helpful/enjoyable to some,
Jacob.

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Sat May 12, 2001 7:01 pm
by Roy Beatty
Boy, I love those one-liners!

Re: Macros/Macro Creation/"Text Editing" a created

Posted: Mon May 14, 2001 4:54 pm
by Jacob Carpenter
Dohh; let me ammend my code:

perl -pe "s/&#(\d+);/chr $1/eg" <filename>

I don't know where that pseudo-character class came from.

P.S. this catches all the &# type entities ...