I use the free software AutoHotkey (AHK) for automation of many things. One of those things is generating headings for my project file. I developed a simple AHK-script that asks me for the project name, the topic and then inserts the heading with additional information like my name, my E-mail address and a keyword for subversion.
The script is quite simple and I have adopted it for headings for several project files (tex, R and gams). The only difference being the characters used to comment out a line.
Here is the script
1 2 3 4 5 6 7 8 |
::tplt:: InputBox, Project, Please type the project name, Project: send {;}{;}=============================================================================={enter}{;}{;} Project: %Project%{enter} InputBox, Subject, Please type the subject, Subject: send {;}{;} Subject: %Subject% {enter} FormatTime, CurrentDateTime,, d MMMM yyyy send {;}{;} Date: %CurrentDateTime%{enter}{;}{;} Author: Renger van Nieuwkoop {enter}{;}{;} Contact: renger@vannieuwkoop.ch{enter}{;}{;}=============================================================================={enter}{;}{;} Version Control Information:{enter}{;}{;} $Id: ${enter}{;}{;}============================================================================== return |
The line with ::tplt:: shows the characters that when typed start the template script (in this case for a tex-file). The lines with “Inputbox” produce a box where I can enter information
In this case, I enter the project name. What follows is the input box for the subject and then some additional information. Note, that the command “send” needs a variable (between %-values), therefore, everything without variables should be on the same line.
Here the result for a new gams project file:
You can easily adapt this script for your own use.