possibile creare una regola dal momento in cui si riceve file txt senza aprire il file?
-
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 -
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. -
@Ekopalypse grazie è tutto chiaro
ù -
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.
-
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 … ?? -
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…
-
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. :-)
-
@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.