Writing a macro-like tool - macros

Recently I've been finding myself doing repetitive tasks. I would click button A, highlight text field A, type in some text, click an APPLY button, click on a drop-down box and select a specific option depending on the item I'm working with, select it and hit APPLY, then repeat this process only a couple hundred to thousand times.
So I thought maybe there's a way I could automate this? Macros then came to mind. However I've never wrote macros before so am not sure of several details such as
-what tools should I even work with?
-how do I determine which button to click?
-ideally, I would want to be able to read input from a text file to specify what should be typed in and which option should be selected from the dropdown list. Is this even possible? It seems like an operation that require some intelligence.
I am not picky on tools nor about cleanliness. I just want to be able to automate the process. It will be for personal use unless I find a convenient way such that others can use it as well.
Some details about the dropdown box: when the box is focused, I can hit the DOWN key to scroll from option to option. The items that I have to associate with these options are named exactly the same, so they appear in the same "index" order (meaning, the first item and first option appear at the top of the list, second item and second option appear after, thid item and third option...etc)
The placement of all of these fields can be fixed, so if I have to manually specify where on the screen I should be clicking, that is also a possibility.
Any idea where I should look?

If you're using Windows, AutoIt is a really nice tool.
It records actions (like a word/excel macro)
It offers a BASIC like language + API which is really easy to program (if you need to)
The API is pretty powerful
Check for Windows with a certain title
Automate klicks
...
You can "compile" your scripts into exe files so you can share your tools
It comes bundled with Scite (a nice text editor) + AutoIt syntax higlighting
But you can use any editor you want
It's well documented
It's Freeware
http://www.autoitscript.com/site/

On the Mac, there is Automator. Java has the Robot class in the basic library, to help with such automation. No doubt there are other similar tools.

Related

Unity C#: How to rebind buttons via script while game is running?

Title says it all, I'd like to implement a controls menu so the player can rebind controls, which changes the positive input key of a button in the Input Manager. But I can't find anything about it online.
How would I go about changing the positive key for a button while ingame?
Unfortunately, I believe you can't set Input Manager values via code at all. That's probably why you didn't find anything about it.
You've got two alternatives:
Use the "Input System" aka. the new input system that is available as a package. It is not as easy to use as the legacy input system, but you should check it out. It's also open source.
Use an asset store package. I've tested Rewired in the past and found it extremely powerful, especially compared to the legacy input system.
Personally, I'd first go with option 1 and see if you are happy with it. It's an official package and not 3rd party. Option 2 is still there, if you have issues with option 1, but it'll probably cost you money.

Build logic in AutoHotKey based on content of GUI

I'm completely new to AHK and I'm trying to find out if AHK can be used as a solution to a problem that I currently have regarding data export from a software tool as I'm struggling to understand what functionality and flexibility you can reach with AHK.
As I don't want to spend too much time in vain for researching and trying stuff out myself with AHK, I would appreciate it if you could evaluate the fit of AHK to the following problem situation.
In the GUI I have a view like this:
I'd like to export each image in both lists one by one by right-clicking the image and then follow along the shortcut menu.
The number of menu items is very flexible on each list so there could be few or even more.
Is it therefore possible to have some kind of function in AHK to assess the number of listed items beforehand and then have a loop that will be executed x times depending on the number of items?

Eclipse. Fuzzy search in Quick Switch Editor

Using Quick Switch Editor (ctrl+E) in Eclipse allows one to navigate trough currently open tabs.
Thing that bugs me is: you must use wildcard (*) to performe fuzzy search.
It looks like it's more convenient to use Open Type (ctrl+shift+T) functionality that support fuzzy search then Quick Switch Editor.
Is there any Eclipse configuration that I miss or plugin that will make my life better?
Kind regards.
I use AutoHotKey to automatically type * whenever I press Ctrl+E, which ends up being essentially the same as Quick Switch Editor using wildcard by default.
AutoHotKey Script:
#IfWinActive, ahk_class SWT_Window0
~^e::Send {*}
You could also set up something similar for "Open Resource" (Ctrl+Shift+R) and "Quick Outline" (Ctrl+O).
Quite some time past since I asked this question, but I think I have something to add now.
GotoFile plugin, I believe is good solution to above problem. It will perform fuzzy-search on all WorkSpace projects.
As it is it doesn't quite address 'navigate trough currently open tabs' problem, but I decided to improve it a bit. For example, if search term starts with '.' it will prioritize open tabs (search will be performed on all files, but open will appear on top; '.' itself will be ignored). Case sensitive fuzzy-search (with 'In' search term resource IndexPage.java will have priority over index.js). On startup -- just display list of currently open tabs (like Ctrl + E currently does).
Basically idea is to have 'single point of access' for QuickSwitchEditor, OpenType and OpenResource functionality. true, it will not replace them, but eliminate 90% of everyday use.

Chrome console + text editor

I find myself typing JavaScript in the console a lot. For example, I quickly want to see the result if I change the property of a certain object. However every time that I refresh the page I have to redefine my variables, etc. I do this by using the up-key, so I do not have to retype, but this costs a lot of time. What is a better way?
The ultimate coolness would be an environment like Sublime Text in which you can write multi line code and from there execute it directly in the browser... And then still have the autocomplete list of all the methods of an object (like in the console). Obviously this is not available, but I am very interesting in the workflow of other when typing JavaScript code in the console.
In Chrome 24's Sources panel, use the Snippets tab. Right-click in the left (blank) tree and choose New from the context menu.

Eclipse debugger for GEF editor

I have a GEF editor which represent a finite state machine. Editor's input (and output) is XML. What I am looking for is a way to debug my editor visually.
The way editor works is you create a state Start->Email->End, XML that is created is send to the server and there magic happens, of course Email object has properties that you set: from email, to email, subject, etc. What I am looking for is a way I can launch a debugger and step through each step of execution. So for example if I break at Email step I would be able to see what message was, whom it was for and what server returned at the end.
Is this something that is possible to accomplish and if so are there any articles I need to read to familiarize myself with how to create this debugger?
I found some discussion about Eclipse debuggers (1,2) but nothing about what I am interested in doing.
There are two different issues here.
One is writing a debugger engine, that manages the execution of your model, for example steps the execution, allows querying the variables/states, etc., and another one that outputs the result in your editor.
The articles you have linked work with the first issue: creating an engine that executes the model in the background, and integrates the engine into the Eclipse environment using 1) the launch framework to execute it similarly as Java programs, and 2) allows displaying the state in the textual editors.
You want to display the state in graphical editors. Because graphical editors have much less in common, the back-annotation of the debug state has to be done manually (instead of the generic support for text editors). Basically, I would create actions that set up breakpoints, and update the model to be able to store/query the execution state, and then update the GEF views to display it on the GUI. For this you have to change your Figures and your EditParts at least, and possibly other places as well.