Page 1 of 1

Emoticon (Smiley) Substitution in Macros Driving Me Nuts!

Posted: 2007-07-26 00:26:31
by rcgordon
I had commonly been finding that typing certain strings in macros cause emoticons to be substituted for the strings I'm trying to type. Sometimes typing something new in the replace string of a Find and Replace macro will even cause a substitution to occur back in the find string.

It's like walking in a minefield where all of a sudden, for no apparent reason, some combination of parentheses and colons will be converted into a frowny face (how appropriate!) or a smiley face (never appropriate).

I finally figured out to remove them from the QuickFix preferences, but really, the program should be smart enough not to substitute emoticons in macros.

Wouldn't you know that this section of a macro to convert Nisus Writer Classic PowerFind Pro macro strings into NW Pro macro strings would drive me over the edge?

##Convert NWC Non-Matching Groups to NWP
Find and Replace "([^\\\\]):(\\\()(.+?):(\\\))", "\\1\\2\?:\\3\\4", "-s-va-i-uU-wWE"


:( :( :( javascript:emoticon(':cry:')

Posted: 2007-07-26 03:49:36
by Agnostus
I fully agree, but would like to go even further: I think it is generally not a good solution that macros have to be edited in a standard NWP document window. Something like a macro editor would be much appreciated. This could be something like a derivative of a NWP doc window, but with a different environment where things not needed for macro processing are disabled, but helpful things offered, such as fixed width font, bracket balancing, indentation, an own glossary with snippests of code (including Perl) and maybe even syntax coloring... OK, now I'm getting carried away 8) , but I hope you get the idea. Maybe something for future x.0 versions... PLEASE...


Posted: 2007-07-26 12:11:35
by martin
I'll see if we can't make some of this more automatic, but for now, here's a little macro I wrote that I use instead of the generic New Macro menu. All it does is apply a paragraph style that is configured to use a language that has QuickFix, spelling, etc, disabled.

Posted: 2007-07-26 12:24:50
by rcgordon
A significant limitation with that approach, though, is that it gets in the way of attribute-sensitive searches.

Well, I don't need no stinkin' smileys anyway, so they're gone from my QuickFix.


Posted: 2007-07-26 12:45:16
by martin
rcgordon wrote:A significant limitation with that approach, though, is that it gets in the way of attribute-sensitive searches.
Perhaps, but even with the default new macro file you still have to be careful about the Normal paragraph style. In fact, I'd say that's a more insidious problem because most often you don't think about it being an attribute that limits your search.

Posted: 2007-07-26 13:11:54
by rcgordon
I agree that the inability to ignore the Normal paragraph style is a problem.

The Nisus Classic approach made so much sense. Every attribute had a "Use any…" variant that could be used in searches and macros.

It also allowed true attribute-sensitive searches where every character and/wildcard could have its own set of attributes (exact, additive, or ignored) attached to it.

This allowed the possibility of very targeted searches by context that are much more complex or impossible to construct in NW Pro.