Re: Tutorial: Notepad++ shortcuts.xml macro converts unicode to the 95-keyboard ASCII characters
"R.Wieser" <[email protected]>
| Newsgroups | alt.comp.os.windows-10,alt.comp.os.windows-11,alt.comp.microsoft.windows |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
Arlen,
> Currently every shortcuts.xml mapping is written out as a 6-line block:
> 1700 -> start search
Initialize.search engine
> 1601 -> set search string (funky character)
> 1625 -> clear replace buffer
search type. lParam=0 -> standard
> 1602 -> set replacement string (ASCII equivalent)
> 1702 -> run replace all
how to search. lParam=768 -> Search forward, wrap-around
> 1701 -> end
Execute the search. lParam=1609 -> Replace all
> The essential trio is:
> <Action type="3" message="1601" wParam="0" lParam="0" sParam="BADCHAR" />
> <Action type="3" message="1602" wParam="0" lParam="0" sParam="GOODCHAR" />
> <Action type="3" message="1702" wParam="0" lParam="768" sParam="" />
> So each mapping shrinks from 6 lines > 3 lines.
In the light of the above, not quite. Maybe the the below ?
-- Initialize
1700
1625
1702
-- Repeated block
1601
1602
1701
Odd though : you have posted the standard macros, as if you have not tested
your "the essential trio" conclusion yourself ...
And a remark : When you replace something with something else, and than
later replace that something else by something-yet-else you won't like the
result (no occurence of "something else" will remain). You need the second
replace come before the first one.
Also, replacing something with itself doesn't really do much. :-)
And a hint : make sure that all indentation is correct before hitting the
"send" button. Seeing the "action" lines having four different indentations
looks ugly. Same for wrapping replace-blocks (those 6 lines you spoke of)
with empty lines. Either do it everywhere, or do it nowhere.
And I almost forgot : You need to be carefull when replacing special chars
with phrases. You might have better results when wrapping the phrases with
spaces ( see "->" and "deg")
And noticed while walking thru that list :
" " is a thin space, not an "x".
"&#151;" to "&" ? Not a dash ?
'"' with single-quotes around it instead of double ones ? Any reason
for that ?
"apos;" ? Why not just a single quote thats available on you keyboard ?
" " is a hard space, not a quote.
"‘" and "’" are twice in there.
"*" is a standard ASCII char ("*"). Why not use it instead ?
Regards,
Rudy Wieser