Running a macro on all open docs
-
Hi
Is there a way to run a macro on all open documents? Currently I have to open each document to run a macro which is a pain. I’ve tried multi-selecting the tabs but that doesn’t work.
Thanks. -
. . . or run a macro on all of the docs in a single folder . . . ?
-
Hello, Andy,
I don’t think this is native feature of N++. But, I do agree, with you, that this feature could be very interesting !
As a work-around, you could :
-
1) Gather the contents of all your opened documents, in a new tab
-
2) Run your macro, on this big file, ONLY
-
3) Replace the original contents of each file, by each modified part : I know, quite tedious :-((
The good news is that Claudia or Scott could build a Python script, or Dail with a Lua script, which would do all these steps, in one go :-)) At least, the steps 1 and 3, anyway !
-
We just need, in phase 1, to separate, in that big file, the contents of each individual file by inserting any header, with the name of the file( as, for instance, ======== sample.txt ========= ), followed by its contents
-
In phase 3, the script would replace all the contents of each individual file by the appropriate part ( known from the header ! ) of the complete file
Best Regards,
guy038
-
-
Thanks for the reply! The individual files are XML order files and have lines which include the number of orders in that particular file. Merging them all into one wouldn’t be ideal without being able to extract them all after - possibly using a custom header as you mention. Ideally, the files also need to retain their filenames.
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