• Login
Community
  • Login

possibile creare una regola dal momento in cui si riceve file txt senza aprire il file?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 3 Posters 398 Views
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.
  • M
    massimo la terra
    last edited by Jul 18, 2020, 11:45 AM

    file ricevuto contiene esempio barcode 2134561245756,12
    regola trasforma automaticamente barcode 134561,12
    elimina il 2 iniziale e prende solo le sei cifre dopo ,tutto questo senza aprire il file

    E A 2 Replies Last reply Jul 18, 2020, 1:55 PM Reply Quote 0
    • E
      Ekopalypse @massimo la terra
      last edited by Jul 18, 2020, 1:55 PM

      @massimo-la-terra

      Cosa intendi dire: senza aprire il file?
      Notepad++ deve aprire, leggere e chiudere il file.
      Se si apportano modifiche e le si salva, il file viene aperto di nuovo, poi scritto e chiuso di nuovo.

      What do you mean: without opening the file?
      Notepad++ must open, read and close the file. If you make changes and save them, the file will be opened again, then written and closed again.

      M 1 Reply Last reply Jul 18, 2020, 2:05 PM Reply Quote 0
      • M
        massimo la terra @Ekopalypse
        last edited by Jul 18, 2020, 2:05 PM

        @Ekopalypse grazie è tutto chiaro
        ù

        1 Reply Last reply Reply Quote 0
        • A
          astrosofista @massimo la terra
          last edited by Jul 18, 2020, 10:29 PM

          Hi @massimo-la-terra

          Not really a Notepad++ related topic, as @Ekopalypse said, but this kind of task cand be easily accomplished in scripting languages as AutoHotkey.

          As an example, the following script watches the clipboard and as soon as one of those codes is copied to the clipboard it will automatically convert it to the desired format.

          #Persistent
          OnClipboardChange("ClipChanged")
          return
          
          ClipChanged() {
          	if RegExMatch(Clipboard, "\d(\d){6}\d{6},(\d){2}\R?") {
          		Clipboard := SubStr(Clipboard,2,6) . SubStr(RTrim(Clipboard,"`r`n"),-2)
          		MsgBox, % Clipboard
          	}
          }
          

          Further information about AutoHotkey .

          Take care.

          E 1 Reply Last reply Jul 19, 2020, 6:07 PM Reply Quote 2
          • E
            Ekopalypse @astrosofista
            last edited by Jul 19, 2020, 6:07 PM

            @astrosofista

            Hmm - I didn’t get that the data is from the clipboard and to be honest,
            after my post I thought OP would clarify what really should be done, but … ??

            A 1 Reply Last reply Jul 20, 2020, 11:12 AM Reply Quote 0
            • A
              astrosofista @Ekopalypse
              last edited by Jul 20, 2020, 11:12 AM

              Hi @Ekopalypse

              I’m sorry if I annoyed you, I didn’t mean to. Given OP’s answer to your request for more information, I understood he was closing the subject. So I suggested him a different way to solve the problem, not related to NPP and without having to deal with files.

              Just trying to be helpfull beyond service…

              E 1 Reply Last reply Jul 20, 2020, 11:55 AM Reply Quote 0
              • E
                Ekopalypse @astrosofista
                last edited by Jul 20, 2020, 11:55 AM

                @astrosofista

                I’m sorry if I annoyed you,

                No, you did not - seems my comment could lead to misinterpretation in that way, which wasn’t intended.

                Just trying to be helpfull beyond service

                Which you do very well. Keep up the good work. :-)

                A 1 Reply Last reply Jul 20, 2020, 11:09 PM Reply Quote 1
                • A
                  astrosofista @Ekopalypse
                  last edited by Jul 20, 2020, 11:09 PM

                  @Ekopalypse said in possibile creare una regola dal momento in cui si riceve file txt senza aprire il file?:

                  wasn’t intended.

                  OK, good to know that :)

                  Just trying to be helpfull beyond service

                  Which you do very well. Keep up the good work. :-)

                  Sure, I always try to do my best, and as I understand, you do as well!

                  Take care.

                  1 Reply Last reply Reply Quote 1
                  7 out of 8
                  • First post
                    7/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors