macro carriage return = 
 with update v.8.5.3
-
It’s a FAQ.
-
@Alan-Kilborn thanxs for the tip; i didn’t know about shortcuts.xml. however, the actual replacement of character-codes as suggested in the faq did not work for me since it just replaced the old character-codes for the new character-codes, so i guess i have to change something else for that to work. but a testmacro with carriage-returns revealed that it actually inserted carriage returns in the xml file so i replaced the character-codes with carriage-returns and that restored the expected behaviour of he macro!
-
@isaac-van-den-berg i was actually too fast; since in copying the lines in the xml file it only inserts a linefeed; which gives problems copying the result to other windows programs via the clipboard…
-
@isaac-van-den-berg You might want to have a look here:
https://community.notepad-plus-plus.org/post/86489 - This is how I solved the issue with help of the FAQ. -
@datatraveller1 thanx; with search and replace (in npp) i had to tick the “regular expressions” option (i had it on “extended”) and it worked. meanwhile in the macro i also have a search for 2 carriage returns and replace it with “carriage return - space - carriage return” and that didn’t work either. i’m reverting to the old version for the time being.
-
@isaac-van-den-berg said in macro carriage return = 
 with update v.8.5.3:
thanxs for the tip; i didn’t know about shortcuts.xml. however, the actual replacement of character-codes as suggested in the faq did not work for me since it just replaced the old character-codes for the new character-codes
Then you did not follow the FAQ correctly, because the replacements shown, when run in regular expression mode (as the FAQ said), will replace the entity with the actual character.
Show a screenshot (with View > Show Symbol > Show All Symbols checkmarked) of the
shortcuts.xml
both before and after your replacement, including the search-and-replace dialogsince in copying the lines in the xml file it only inserts a linefeed;
Since you don’t show a screenshot showing newline characters, but I’m pretty sure what you’re referring to is the bug reported here. I have updated the FAQ:
And when I do those replacements, in regular expression mode, in the order specified, then it converts the macros correctly.
And while I was writing this up, you wrote,
i had to tick the “regular expressions” option
Yep, as it told you to do in the FAQ.
meanwhile in the macro i also have a search for 2 carriage returns and replace it with carriage return - space carriage return and that didn’t work either.
My new series of three replacements will work correctly for you, to convert the original entities into the right sequence of actual
CR
andLF
characters -
@PeterJones peter sorry, our messages passed eachother so i actually anwered datatraveller1’s reply before i saw yours. i don’t (yet) know what you mean with “My new series of three replacements” but i will get to it. meanwhile i stick to the old version for now. thx
-
@isaac-van-den-berg said in macro carriage return = 
 with update v.8.5.3:
peter sorry, our messages passed each other so i actually anwered datatraveller1’s reply before i saw yours.
I know, I said “and while I was writing this up, you wrote:” to indicate that I knew you’d given additional information.
i don’t (yet) know what you mean with “My new series of three replacements” but i will get to it.
The updated version of the FAQ includes three replacements instead of two, and I put a screenshot of the relevant portion in my post. Was I really that unclear?
-
Hello, @peterjones and All,
In the
FAQ Desk: v8.5.3 Macros and Run-Menu Commands
, you said :FIND WHAT =


and REPLACE WITH =\x{000D}\x{000D}\x{000A}
with Search mode set to Regular ExpressionWouldn’t that be more like :
FIND WHAT =


and REPLACE WITH =\x{000D}\x{000A}
with Search mode set to Regular Expression ??Best Regards,
guy038
Oh, my bad ! I did not read your note, just after. Sorry for the noise !
-
Good News
I have confirmed this morning that the following macro will work with v8.5.2, v8.5.3, and v8.5.4, embedding the CRLF newline in each:
<Macro name="Newline 2digit" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="1" message="2170" wParam="0" lParam="0" sParam="
" /> <Action type="1" message="2170" wParam="0" lParam="0" sParam="
" /> </Macro>
So the two-hex-digit entities work, but the four-hex-digit ones do not. I will shortly be updating the FAQ to match.