Need a timed reversible DC motor with either a string or rack and pinion.

Originally this was a way to cheat a video game.  But it kills two birds with one stone.  I get what I want in the game and I get to learn about electronics/robotics...

I want to create a device that will lower a stylus to touch the screen on an ipad, then lower another stylus to touch another part of the screen.  Then 6 seconds later repeat.

I thought to use 2 timers and 2 DC motors with either string attached to a spool attached to the styluses OR a rack an pinion set up.  But I don't know what type of timer I need, or how to make a switch to reverse the direction of the motor...  Thanks so much in advance!

J

I suggest using a micro controller and linear actuators. Motors winding a string back and forth will be slow. Linear actuators will actually extend like you want. The micro controller can extend and retract the actuators as needed with the timings you program it for.