I'll add a recommendation for the macro software called Macro Angel. This program has very comprehensive keyboard macro programming, including functions such as specifying time between keystrokes, recording (to skip programming by hand), etc.

Macro Angel also has a TON of higher level functionality (which I've never tried and can barely comprehend). This includes Windows GUI level functionality such as switching between programs based on their unique ID and executing other high level Windows functions. Lots of samples are included for your inspiration and adaptation.

This program is no longer being developed, and I don't think you can even buy it any more. The demo version has the only functional limitation of how many "steps" you can have in a macro. Note, you can record a mass of keyboard commands into a single "step", but if you want to use looping or logic to determing which "step" to execute, that's where you may hit the limit.

A brilliant piece of software which has saved me hundreds of error-prone man-hours at my work.
_________________________
-
FireFox31
110gig MKIIa (30+80), Eutronix lights, 32 meg stacked RAM, Filener orange gel lens, Greenlights Lit Buttons green set