Running Macro in Notepad++ from Commandline - shell

Is it possible to run a Macro which i record in Notepad++ from the Commandline? Say i record a Macro to search and replace, which i can run in Np++ for the whole text file, i would like to do this kind of Job in a Shell file, is this possible? I couldnt find anything about this in the Documentation.
If not possible can anybody recommend alternative easy to use porgrams for this kind of Job?
Thank you

I haven't seen any documentation on doing this in Np++, but I am pretty sure you can do it in UltraEdit. This is not a free product, though.

Related

Make links in stylelint report in bash output clickable

I am using stylelint and eslint and I just mentioned that it is possible to click on a line in eslint to directly open the file in my IDE and jump to that selected line.
I was wondering if it is possible to add a similar feature to stylelint since this is not possible by default:
I already tried to fix this, but I cannot find a track that feels good. Can you recommend a way to do this? Is this something that should be changed directly in the source code of stylelint or should it be written as plugin? And if yes, is there any plugin that already modifies messages that I can use as example/reference? Or does this feature already exist and I was just not able to find out how to enable it?
Another idea of myself was to pipe/pass the output of stylelint to another script to then be able to use some regular expressions to replace the lines with hyperlinks like described in Terminal - create hyperlinks, but I think there should be a less hacky way to resolve this.
Looking forward to some tips where I should dig deeper, thank you in advice!

Present content like power point or impress

I want to build an application that displays the content that user types on the command prompt to the display like a presentation.
I am writing this application in golang. If there are existing libraries that I can use to do this great and if not would need direction how to approach solving this.
I did search on the internet for pointers but found none.
Have a look at the present tool, it does a similar thing using flat files and might even be useful for you.
https://godoc.org/golang.org/x/tools/present

How do I make sense of a batch file?

I have no prior experience working with batch files or shell scripting in general. I need to understand the operations being carried out by a batch file used in a related project. Any resource that gives exhaustive list of batch file commands and what each one does?
Once you get acquainted with the general .BAT file information, using some of the pointers to useful information that other users have posted in the other answers, you might try some of the following strategies that help you understand and analyze the BAT files used int your projects:
add an ECHO command in front of all command invocations
read HELP command for each command line in the BAT file
execute at the command prompt each command line in the BAT file
remove the #echo off at the top of the .BAT file, and see how the BAT progresses
add some PAUSEs to keep viewing some commands on screen before they disappear.
There are some useful answers here in this Stack Overflow question: Best free resource for learning advanced batch-file usage?
As well there are quite a few resources available through google search for Batch file resources, as well as the Wikipedia entry http://en.wikipedia.org/wiki/Batch_files
That should get you started at least.
A little search on google should give a lot of tutorials and websites with information on writing them for both Windows and Linux.
Maybe you should start from the beginning though.
http://ss64.com/nt/
http://academic.evergreen.edu/projects/biophysics/technotes/program/batch.htm
http://www.robvanderwoude.com/batchcommands.php
http://en.wikipedia.org/wiki/List_of_MS-DOS_commands
They're just a few examples i found with a little google search. You should search it and find something thats better for you.
Hope this helps.

How to perform multiple find and replace in TextMate besides macro?

I have several regular expressions to find and replace text in documents in TextMate. I would like to be able to have them run in a batch. I made a macro and it worked, but any tiny modifications to the macro means re-recording the macro. And I can't seem to modify the regex within the TextMate interface. It's read-only for some reason.
Can I make it into a command? Does anyone know how? I tried to read the TextMate help about commands, but it wasn't much help. It seems I need prior knowledge of shell scripts or some sort (which I have none). Any advise in the direction would be great.
Thanx in advance.
First, it's possible to edit macros. Since this is the easiest solution for you, here is how you do it:
Record a new Macro and save it in TheBundleOfYourChoice
Reload Bundles via "Bundles" > "Bundle Editor" > "Reload Bundles"
Open the file "~/Library/Application Support/TextMate/Bundles/TheBundleOfYourChoice.tmbundle/Macros/NameOfYourMacro.tmMacro" in TextMate (you can access any path - including hidden ones - if you press Command-Shift-G while in the "Open File" dialog)
Change the XML-representation of the Macro to your needs
Reload Bundles again
Use updated Macro
This solution may be the easiest for you, because it doesn't require you to learn a scripting language and should be OK for minor changes. However another very reasonable approach is choosing a scripting language of your choice and simply build a command, which runs your regular expressions. You can use perl, python, ruby, bash and so forth. A simple solution should be bash with sed. sed is a small tool, whose only purpose is to process text and should be ideal for you. bash is the default scripting langauge, so should be no problem either. You will figure it out somehow and learn a lot. Give it a try! :)

MS Excel automation without macros in the generated reports. Any thoughts?

I know that the web is full of questions like this one, but I still haven't been able to apply the answers I can find to my situation.
I realize there is VBA, but I always disliked having the program/macro living inside the Excel file, with the resulting bloat, security warnings, etc. I'm thinking along the lines of a VBScript that works on a set of Excel files while leaving them macro-free. Now, I've been able to "paint the first column blue" for all files in a directory following this approach, but I need to do more complex operations (charts, pivot tables, etc.), which would be much harder (impossible?) with VBScript than with VBA.
For this specific example knowing how to remove all macros from all files after processing would be enough, but all suggestions are welcome. Any good references? Any advice on how to best approach external batch processing of Excel files will be appreciated.
Thanks!
PS: I eagerly tried Mark Hammond's great PyWin32 package, but the lack of documentation and interpreter feedback discouraged me.
You could put your macros in a separate excel file.
Almost anything you can do in VBA to automate excel you can do in VBScript (or any other script/language that supports COM).
Once you have created an instance of Excel.Application you can pretty much drop your VBA into a VBS and go from there.
If it's the Excel/VBA capability that you're looking to use then you could always start by creating all of the code that will interact with the Excel files you're wanting to work on within an Excel file - a kind of master file that is separated from the regular files, as suggested by Karsten W.
This gives you the freedom to write Excel/VBA.
Then you can call your master workbook (which can be configured to run your code when the book is opened, for example) from a VB script, batch file, Task Scheduler, etc.
If you want to get fancy, you can even use VBA in your master file to create/modify/delete custom macros/VBA modules in any of the target files that you're processing.
The info for just about all of the techniques I'm describing I got from the Excel VBA built-in reference docs, but it certainly helps to be familiar with the specific programming tasks that you're tackling. I'd advise that the best approach is to put together your tasks (eg, make column blue, update/sort data etc) one by one and then worry about the automation at the end.

Resources