terrypin Posted March 3, 2020 Report Share Posted March 3, 2020 First, I assume you've now successfully run the macro? -------------------- Re your latest questions: To copy command text from the Script Editor: Select all > Right click > Copy Command Text To copy code from the Script Editor or Direct Editor: Select all > Ctrl+C Yes, it's just convenient to paste both commands and code into the Code box. Some of us do that and others open separate boxes. For a recipient, it's a matter of seconds to run a macro from its pasted code. Even faster than importing an MEX I'd think. And either method usually then requires editing to be sure the macro runs successfully in the recipient's environment. Quote Link to comment Share on other sites More sharing options...
dgehman Posted March 3, 2020 Author Report Share Posted March 3, 2020 1 hour ago, terrypin said: I assume you've now successfully run the macro? (Thanks for the answers.) And, yes, it runs after (of course) changing the paths to the files involved. It's a great learning experience, and it's going to be even better, since I want to modify the area to be deleted (adding a few lines previous to those I underlined in the full HTML page example in this thread). I do wish that Text File Begin Process had an option for the currently open file, to make the routine generic. I expect that this can be done by expressing the path of the file -- the file that I want to be processed -- as a variable. Maybe. And it would be more fun if I could see the file (in Notepad++) at it is being modified. It took me a minute or two to figure out it's a black box operation and that the output file was done and ready to look at. BTW, your macro takes less than a second to create the new output file from the 255-line original file (this, on a 10-year-old Dell Precision T3500 with a single, quad-core Xeon CPU). Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 3, 2020 Report Share Posted March 3, 2020 Quote I do wish that Text File Begin Process had an option for the currently open file, to make the routine generic. I expect that this can be done by expressing the path of the file -- the file that I want to be processed -- as a variable. Maybe. Yes, that's easy enough. Exploring MEP's excellent Help you'll soon find several ways to do it. If you run into difficulty post again, but then please clarify what you are (always) doing at the point you will activate the macro. Looking at the HTML? In what application (browser, text editor, HTML app, etc)? Or with the file selected in its File Explorer folder? The same folder for every file, or varying folders? Also, as your comment suggests you may have many of these to process, think about using Repeat with Folder to convert all target files automatically. Quote And it would be more fun if I could see the file (in Notepad++) at it is being modified. It took me a minute or two to figure out it's a black box operation and that the output file was done and ready to look at. That's easy too but, although it might be fun for a while, it will slow down completion enormously. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.