NeoMoses,
A trivial VisualBasic code could achieve what you want (unless you timing is very critical, i.e., milliseconds accuracy).
For such things, I normally use a PIC (
www.microchip.com) microcontroller (programming required). In most cases, it just need a chip and some transistors (& resistors, caps) and switches. Accuracy to microseconds and fully repeatable.
I could offer some help on both methods. I do need to know your 'circumstances' before suggesting a solution.
Regards