Community
    • Login

    Notepad++ Batch program find lines missing "..."

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    find and add
    2 Posts 2 Posters 1.8k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sebastian SchmidtS Offline
      Sebastian Schmidt
      last edited by

      Hello guys,

      i got a .ptp with 2000 string looking like this:

      N0070 G18 G03 X-3.4602 I-.0569 K0.0 F35.4
      N0080 I.1137 K0.0
      N0090 X-3.3465 I.0569 K0.0
      N0100 G00 Y-.1181
      N0110 G03 X-3.4602 I-.0569 K0.0
      N0120 I.1137 K0.0
      N0130 X-3.3465 I.0569 K0.0
      N0140 G00 Y-.2362
      N0150 G03 X-3.4602 I-.0569 K0.0
      N0160 I.1137 K0.0
      N0170 X-3.3465 I.0569 K0.0

      i want to write a batch program, which finds the lines where there isnt G00, G01, G02, G03.
      and then go back 1 line and copy G00 or G01 or … into the line below.

      So for example:

      Line with N0080 because there is no G03, the goto line N0070 and copy G03 in line N0080

      Can anybody help me?

      Best regards,

      Sebastian Schmidt

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Sebastian Schmidt
        last edited by

        @Sebastian-Schmidt

        it might be possible that a regex can help in such a case but you need to
        know where exactly the missing G0? needs to be placed but in general
        I would advise to learn a scripting language for solving such problems.
        I, of course, would advise to learn python. ;-)

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors