Dim ReturnValue, I
ReturnValue = Shell("calc.exe", 1)   \' Run Calculator.
AppActivate ReturnValue    \' Activate the Calculator.
For I = 1 To 100   \' Set up counting loop.
   SendKeys I & "{+}", True   \' Send keystrokes to Calculator
Next I   \' to add each value of I.
SendKeys "=", True   \' Get grand total.
SendKeys "%{F4}", True   \' Send ALT+F4 to close Calculator.
ReturnValue = Shell("calc.exe", 1)  - u can change "calc.exe" to "notepad.exe" etc
I think the SendKeys command is what u r looking for although there may be something better.
To record things then i guess u could use a .dat file - there are tutorials on using dat files although i could post somehting if i have time
I had some fun on the last day of my computing class with this command...