Notepad++ - Help With 'impossible' Macro Lparam Codes

Discussion in 'Software' started by chookers, Jul 21, 2017.

  1. chookers

    chookers Staff Sergeant

    I've recently been getting the hang of how macro codes are made up, in particularly, find and replace code lines. But I've hit something rather strange and hope someone here can either tell me, 'that shouldn't happen' or, 'this is what that means.'

    I have a find and replace macro that looks for lower case letters that are followed by a line return and when it finds one, it replaces the line return with a space. For example:

    The macro is looking for each letter of the alphabet in turn, so each set of codes follows this layout (I've left out brackets because I'm not sure how the forum handles them):

    Now, my understanding says that it's impossible to have 1922 as the lParam for message 1702 because that parameter is the result of adding the values that represent options, the maximum possible result being 1023. I have a couple of other macros that have lParams that should be impossible. I got my information from the Wiki, here:
    Flag values when message = "1702"

    Anyone able to shed light on this?

    Thanks.
     
  2. chookers

    chookers Staff Sergeant

    Well, no one has answered this but I finally found the answer while playing around and testing different possibilities.

    There is a 1024 value that isn't listed in that list I linked to, and it's not available unless you choose a Regular Expression search mode. Now since I have no idea how to use that... I don't! But I was playing around with the entire search box soon after installing Notepad++ and must have toggled it then. It's the 'match newline' option.

    Strangely enough, the type of replace you choose can override your options so that only relevant values are added BUT... the newline value seems to persist if it's ticked, even when you aren't using RegExp mode.

    Choosing to replace a string in all open documents means:
    - wrapping the search
    - whether you search in an up or down direction, and
    - replacing 'in selection' only
    become moot points and their values don't get added but change from RegExp to another search mode and the 1024 value still gets added. Odd.

    I'm not sure if it persists if you change from RegExp to a Normal Search but it must if you choose Extended search mode, because that's the type I was using. (If you know how to read the code, which I mostly do now, it says so in there but the \r\n is a dead giveaway anyway - that's the code for a line break and can only be used in an Extended search mode.)
     
    Last edited: Nov 7, 2017

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds