You can also download form the apple/applescript site the System Events 1.2 beta. This enables key input for Applescripts. You could write an on idle script and include a keystroke which will run the script.
immsav's suggestion of iKeys is the most straight forward approach, though.
Craig