How to create a Notepad++ macro to run multiple plugins automatically? - macros

I am using Notepad++ for different languages i.e: JAVA, C, C++. For each of these languages I have installed plugins to make coding easier in Notepad++.
The problem is that every time I start Notepad++ I have to go and run all those plugins manually. I tried recording a macro so that it will perform all these actions by one click but it didn't record anything I did with the plugins. The macro will record any changes I bring to the code or if I save the code to some other location but it won't record the actions performed by the plugins.
Can anyone guide me to a solutions.
Thank you in advance.

Have a look at AutoHotKey tool. It can send keystrokes/mouseclicks to Notepad++ so you can easily combine invoking many menu items into one command. (And much more like work with clipboard, ask for values in input boxes, run apps or DLL's.) Please see AutoHotKey usage with Notepad++ in this answer.

Related

How to open multiple files and edit them in eclipse

I'm using Practically Macros, but maybe there is some better Eclipse macro player for this task?
I run some commands on huge amount of files.
How do you open all files from a folder - one at a time - recursive, then do some commands on them?
Also is there some better fix for using the save command if there were no changes made? Like only save if changes where made. Now it generates an error so I write an character and then remove it to always be able to save.
I know how to do the file editing, but I first must open the files manually and it takes alot of time because if I select multiple I can't use the open with (Progress OpenEdge AppBuilder (OpenEdge UI Designer) is default and I don't want that but thats not the point here).
Practically Macro example:
*file editing, many commands*
Insert string: -
Delete previous character
Save
Close
Play last macro
This edit all the currently opened files like I want them (beautify).
This generates an error when there is no more files to close. How to fix?
So my macro/progress questions where:
Is there a better macro player for eclipse than Practically Macro?
Is there a way to use the save command only when needed?
Is there a way to not get errors when all files are closed? Or a way to detect when the recursive loop should end.
Is there a way to open multiple files with in Progress Developer Studio in text mode?
Is there a way to recursive open all the files in a folder (one at a time and open with OpenEdge ABL Editor) with macro?
This version of Practically Macro had semi-usable Eclipse macro support for my current version of Eclipse (Mars). Another option that seems to take a more official approach, but hasn't seemed to get much traction yet, is EASE.
If you do these kinds of tasks regularly, you could script things externally, in perl or Node.js or any other of the dozens of high-quality scripting languages out there.
WARNING: there appear to be two older versions of Practically Macro you might stumble upon. One is also on the Eclipse Marketplace but not marked with the trailing "-0". There is also another older one on SourceForge.

Automated function hints tool in Matlab

I have worked shortly with Netbeans using Java and use eclipse for school projects, where I noticed there are some really cool features like it will show built-in functions on ctrl-space or it will suggest from existing variables. I recently started using matlab, I was wondering if there are any such tools available in the matlab. I know it's a scripting environment so things are probably a little different but then I wonder people who work with extensive projects with matlab, how would they manage the codes or cross-develop without such tools. I searched mathworks but could not find any useful information on that.
Anyone knows if such tools or add-ons existe for matlab? Thanks in advance guys!
As mentioned before, autocomplete works for functions, variables and fields.
If it seems to fail to work for a field (perhaps because your workspace is not properly set up) it can help to call the field without index:
For example:
entity.field instead of entity(i).field
Also if you change the workspace frequently it may be that the mfile editor does not catch up, in that case a quick workaround is to just type in the command window and copy afterwards.
As mentioned before the variables need to be in workspace.
I often approach so that I evaluate the code as I write it like this:
Write the code in cell mode
Evaluate cell with [ctrl - enter] - or button in menu bar.
Write next cell (variables of previous blocks are now available in workplace, autocomplete with tab)
There is also a matlab mode for emacs. It offers some autocomplete functionality and has a nice feature to wrap long code lines.
unfortunately on windows it lacks the ability to evaluate cells. So I rarely use it.
There are some similar design in MATLAB, one of them is called function hints.
You could find the documentation for it in here: http://www.mathworks.com/help/matlab/matlab_env/check-syntax-as-you-type.html

how to write notepad++ auto-complete plugin

I'm trying to develop a small plugin that will do a sort-of auto-completion along with some other advanced features in order to create a primitive IDE to use with a custom scripting language we've developed.
So I want to know, how do the auto-complete plugins usually work? I have a basic plugin template that I'm playing around with (the C# one) and I see how the commands work, from a high level anyway, but I'm trying to figure out how I would create my auto-complete feature.
My first guess would be to make a command that spawned a new thread that retrieved the entire contents of the notepad++ text every 100 mills or so and then popped-up a little selector box or directly wrote the auto-complete possibilities when the correct pattern was matched on the newly typed text.
Any wisdom from those who have gone before me on this?
Thanks alot.
Well I figured it out. Apparently there is a "beNotified" method in my project template that I downloaded and it handles all events/notifications from the Scintilla/Notepad++ environment. I will probably be using the SCN_CHARADDED event to check the current line of text each time a character is added to the GUI.

Macro functionality with keyboard shortcuts in Eclipse?

Having used Netbeans for ages and being new to Eclipse I couldn't see any built-in Macro functionality in Eclipse. I found the Practically Macro plug-in but this does not seem to have the capability to add keyboard shorcuts. One needs to go through two menus and therefore two mouse clicks to run a macro using the aforementioned plugin.
This does not serve well for my need of frequent macro applications. Is there anyway to have very simple Macros using keyboard shortcuts in Eclipse? Or should I start writing my own Eclipse plugin for this? Or perhaps use another light weight tool for this purpose? Do you have any suggestions?
There doesn't seem to be anything else than Practically Macro for Eclipse. Once you use a Macro, you can press Ctrl-Alt-P to replay that. This helps a bit, but when you want to switch between a couple of macros back and forth doesn't help much.
Not sure about this Macro plug-in you're using, but you can modify keyboard shortcuts (Helios) in Preferences->General->Keys.
Testing PracticallyMacro I found that it did not record right clicks but I was able to find a perfect utility 'TinyTask' and 'TyperTask'. The former can export record and save as small 'exe' files which can then be added as external Eclipse builders the latter can automate tasks based on typed characters - epic.

How can Perl fill out fields on a GUI made in Visual Basic?

I have a script that runs several little programs I don't have the source code to, one of which requires filling out some fields in a GUI. I've been doing this by hand, but I'd like to have the Perl script focus the GUI window, then enter some hardcoded text into each field and close the window.
In the past I've used the Win32::GuiTest module for tasks like this. Have a look at the example scripts and documentation.
Unless there's a specific reason you're using Perl, Autoit is a Basic-like scripting language pretty much specifically designed for automating GUI tasks. It's very easy to pick up.
You can have it wait for a window to become active, send any sequence of keystrokes or tell it to specifically focus on a GUI element with a given handle, and much more. You can also package the scripts as standalone executables, which can be a nice benefit when you need it.
You might want to look into Win32::OLE. There's also a book on this topic.