Automating windows

25. September 2006 10:22 by smurillo in General  //  Tags:   //   Comments (0)

Do you ever find yourself doing repetitive tasks on your computer? When you are a developer and this happens to you, the tendency is to start thinking about how you can automate that task and if it's worth the effort. You could immediately start thinking about WMI or API's, but there could probably be a simpler and quicker solution, macros.

I remember using the discontinued Macro Recorder on Windows 3.1 and thinking how useful it was. Recently I found myself taking lots of screenshots and adding borders to them using Paint Brush (I know there are lots of image editing tools that could easily do that for me). When I had done it a few times I started remembering the old macro recorder and I thought it couldn't have helped me much on this.

I started looking for modern alternatives and found AutoHotkey and what a long way we've come. It's not just a recorder, you can automate all sorts of stuff, interact with windows and controls, wait for events and automate tasks through hotkeys and hotstrings. Best of all, you work with text scripts that you can edit manually and even compile them into executable files.

Since I have been working on the virtualization scenario for a while now I also think about the impact this can have in terms of virtual machines. For example, perhaps you could add startup scripts that will install applications that could not be included in the image for licensing reasons.