Archive for February, 2011

Flexible macro system in Windows using AutoHotkey

AutoHotkey allows you to automate many repetitive tasks. This can be something as simple as focusing a (specific type of) window or as complex as executing a whole series of steps.

Often only the main AutoHotkey configuration is used. This approach has the following problems:

  • The file grows large
  • Changing definitions requires saving and reloading of the file (easily forgotten)

An alternative approach is to make small autohotkey script files for each key you want to map to (.ahk extension) and a shortcut to edit the file. Here is an example of the main file using F9 for the action and Shift+F9 for editing the script.

	Run c:\macros\F12.ahk
	notepad c:\macros\F12.ahk

If you often have complex actions you might want to use AutoScriptWriter (included with AutoHotkey). If you use it often you also may want a key assigned for it:

	Run c:\macros\AutoScriptWriter.lnk
Wednesday, February 16th, 2011 Uncategorized No Comments

Auto-detection of moved files in bazaar

When renaming files outside of your versioning system (e.g. you use refactoring in an IDE) bazaar by default will not detect this and treat the old file as removed and the new file a new item in your repository.

To keep the history information of the file (autodetect which files have moved) you can use the following command:

bzr mv --auto 
Tuesday, February 15th, 2011 Uncategorized No Comments