• Macro for a game

    Locked
    5
    -1 Votes
    5 Posts
    316 Views
    Michael VincentM

    @Noah-Thornquest said in Macro for a game:

    setup a macro to farm this game for me overnight

    Sounds like you want a script, not a text editor. Learn the API for your game and find a scripting language that has support for it.

    Cheers.

  • Delete ";" in a description column

    5
    0 Votes
    5 Posts
    394 Views
    Jose Emilio OsorioJ

    @PeterJones
    Hi Peter,
    After a lot of tries, it works with the following expression:

    (^[^;];[^;];|\G)[^;]\K;(?=.;[^;];[^;]$)

    Thank you very much.

  • Line break brainstorming (×_×)

    8
    -1 Votes
    8 Posts
    251 Views
    Neil SchipperN

    Faisal,

    It is almost certainly true that the text you want to modify came from a spreadsheet or database. If you have access to the original document(s), or their legitimate owner, then this is more an issue of how the data was exported. All modern tools allow exports that that use field separation by tabs or commas.

  • Replace certain characters when typing (YAML)

    11
    0 Votes
    11 Posts
    666 Views
    EkopalypseE

    @PeterJones

    That was quite a lengthy process.
    First I read through the question.
    Then I tried to understand the question and what a possible solution might look like.
    Then I had coffee and cake and had to start all over again.
    In no time at all, 2 hours went by :-D
    In the end I did a copy and paste so as not to miss dinner.

    :-D

  • ReplaceAll InSelection keeps selection...sometimes!

    8
    3 Votes
    8 Posts
    249 Views
    Alan KilbornA

    BTW, during some of the testing for this, I got into weird situations (one mentioned above) where definitely the In selection checkbox was “out of sync” with how Notepad++ normally handles it.

    As another example, I had selected text, and the In selection checkbox was not ticked, but when I did a Find All in Current Document, the Find result window said:

    (0 hits in 0 selections of 1 searched)

    instead of:

    (0 hits in 0 files of 1 searched)

    So something funky is up with that.

    I remember a recent poster in another thread had said that even though he had selected-text, the In selection box would not “enable” for him so that he could tick it. I tend to take that poster a whole lot more seriously now. :-)

  • How can I mark multiples selected lines (to use with F2 after)

    6
    0 Votes
    6 Posts
    5k Views
    OverlordBRO

    @Alan-Kilborn said in How can I mark multiples selected lines (to use with F2 after):

    BTW, the @PeterJones solution is one that cries out for a macro to be recorded for it, so that it appears as a nice command in the Macro menu and can optionally be tied to a keycombo for quick usage.

    Thanks for you extended explanation abou the problem, Alan!

    I will put both solutions on macros tu use with a key combo.

  • How to join these two lines

    5
    -1 Votes
    5 Posts
    204 Views
    Terry RT

    @carypt said in How to join these two lines:

    (! you will have to add end of line characters to the replace string)

    Please read this as constructive criticism, I mean no offence.

    A trick you will learn is that since you have captured the line ending in the search code (\R), then you can use that in the replacement field by including the group number (\2) in your case. So it doesn’t matter what type of line ending the file uses, you have captured it and can use it in the replacement.

    Also, you may want to format your answers a bit better. Just one long paragraph makes it a bit hard to understand. And with the s: and r: I know what they are, but sometimes newbies won’t, so consider writing things in full.

    Just take your cue from some of the seasoned forum members in how to write “lovely” prose.

    Cheers
    Terry

  • how to append the numbers with specific string ??

    14
    0 Votes
    14 Posts
    1k Views
    Terry RT

    @kamal-lochan said in how to append the numbers with specific string ??:

    Wherever Kamal string is there i wants to append some number to it .

    Here is an alternative option which ONLY involves regular expressions (and the column editor function).

    replace all CRLF with @@
    Place cursor in the first position of the file. Using the Replace function we have
    Find What:\R
    Replace With:@@
    Search mode is “regular expression”, click on “replace all”

    insert CR & LF before every “kamal” text
    Place cursor in the first position of the file. Using the Replace function we have
    Find What:(([a-z]+)?kamal)
    Replace With:\r\n\1
    Search mode is “regular expression”, click on “replace all”

    insert line numbers and move to behind the “kamal” text
    Check if the first line has the “kamal” text, if not position the cursor in the first position of the second line (which does have the “kamal” text). Use column editor and use “number to insert”, starting 1, increase 1 and repeat 1, click OK.

    Now to move the number behind the “kamal” text.
    Using the Replace function we have
    Find What:^(\d+)[a-z]+)
    Replace With:\2 \1

    recreate the original CRLF and remove the previously inserted ones
    Using the Replace function we have
    Find What:(@@)|\R
    Replace With:?1(\r\n)

    I’n not proposing that you use this method as it seems you are well on the way to solving it the “pythonscript” way which is far more sensible. I’m showing you another method which is very simple to understand but as a consequence has a few steps to it.

    Terry

  • need help guys

    5
    0 Votes
    5 Posts
    205 Views
    Nightcore AMVN

    @Alan-Kilborn Thanks Bro
    alt text

  • How do i merge lines (Pt. 3)

    10
    1 Votes
    10 Posts
    800 Views
    Faisal AlamF

    @guy038 Damn brother this worked perfectly tysm

  • Writing Kotlin in NP++

    4
    0 Votes
    4 Posts
    7k Views
    Michael VincentM

    @Jason-Tilford-0 said in Writing Kotlin in NP++:

    support the Kotlin language

    Depends on the degree of “support” you want. If it’s just lexing (coloring), then as @Alan-Kilborn says it is Scintilla-related. But again, if it’s only lexing (coloring) you want, you can try a User Defined Language route and create your own Kotlin parser. Lucky for you, our esteemed function list / UDL guru @MAPJe71 has a Kotlin UDL parser you can try.

    Cheers.

  • 2 Votes
    4 Posts
    176 Views
    Alan KilbornA

    @PeterJones said in How do I add a specific text at the end of each line start with same specific text:

    his worked for me without edits, without the braces. Though I agree that braces are a better idea, to avoid problems.

    Ha. I didn’t even try the original replacement string.
    It isn’t often that we get a request where someone actually has it right at the time of asking!

    I thought there was something special about 0, and you’re right, I just always err on the side of caution and do ${0}, ${1}, etc. I guess the special thing I’m thinking of about 0 is that you can’t do \0 like you can \1, \2, etc.

    Aside: Most people like the \1 notation because it is shorter than ${1} but I like the cleaner look of the latter, and “leaning toothpicks” make me crazy as well.

  • Deleting numbers from LIST 1, that also appear in LIST 2

    26
    0 Votes
    26 Posts
    3k Views
    guy038G

    Hello, @m-p, @peterjones, @alan-kilborn, @troshindv and All,

    Oh…! Indeed, dealing with two files of 7,400,000 and 1,200,000 lines is not an easy task ! So you will have to work with a 8,600,000 lines file : good luck !

    Do not hesitate to ask me for more information if you encounter difficulties in implementing my method !

    First, I would advice you to repeat my own tiny example, first, to get its general idea

    Regarding your real example, I would say that :

    The N++ sort feature is very quick, in all cases

    I suppose that the numbering operation, with the column editor, should not be very long, too !

    May be, the first of the three regex S/R will probably take some time. Just be patient : it should work in the end !

    Best Regards

    guy038

  • Merge lines using Regex

    8
    1 Votes
    8 Posts
    659 Views
    PeterJonesP

    Once again, @Faisal-Alam moved the discussion from this topic to a third new topic for the same discussion. For future readers, sorry for the inconvenience.

  • How to merge lines in bulk

    9
    0 Votes
    9 Posts
    789 Views
    PeterJonesP

    For future readers, the discussion continues in another Topic.

    (In general, it’s advised that clarifications of the same question be made in the same Topic, but since the discussion continued there, there’s not much we can do about it in this instance.)

  • Type is all caps only, how to change

    4
    0 Votes
    4 Posts
    526 Views
    Alan KilbornA

    @dan-wilson said in Type is all caps only, how to change:

    big fella

    “Big fella”? LOL
    Hardly, I’m 5’ 8" in the mornings; shorter at bedtime. :-)

  • Np++ no styles when start

    11
    0 Votes
    11 Posts
    511 Views
    Celestin NohaC

    Thanx you all … its working now :) … i didnt do anything … and suddenly its ok … maybe its relate with corrupted ram which i change today … many thanx again

  • How can I delete all rows before or after my current line?

    8
    0 Votes
    8 Posts
    22k Views
    Enno DünkelE

    @PeterJones: That 2 shortcuts work best for me - I don’t just want to keep the cursorline.
    Sorry for my stupid question - thread is solved. And the solution is very simple…
    Thanks a lot!

  • Conditional read of fileshares

    2
    0 Votes
    2 Posts
    117 Views
    PeterJonesP

    @Roland-Bengtsson ,

    There is a checkbox in the preferences which determines whether or not you want Notepad++ to check for the existence of files from the MRU (Most Recently Used list) at launch time. Unfortunately for you, that does not apply to open tabs.

    Basically, Notepad++ always wants to load the bytes from the file for any tabs open in the current session. Doing “just in time” reading of the file (when that tab is activated) would likely require a significant rewrite of the codebase… but I could be wrong. If you go into the FAQ section of this forum, you’ll see a post “FAQ Desk: Feature Request or Bug Report”, which will explain where and how to make a feature request. If you submit a feature request, understand that it might not be implemented. If you submit a feature request for this idea, it would be considered polite to grab a link to that request and put it in this topic, so future readers of this topic can track what happened to that request.

  • How to automate EOL conversion for live data feed

    2
    0 Votes
    2 Posts
    662 Views
    dinkumoilD

    @A-Former-User

    To use Notepad++ (or any other texteditor) for batch-conversion of EOL format is the wrong approach. Use a command line tool instead.

    For example, have a look at https://waterlan.home.xs4all.nl/dos2unix.html