I have two windowed applications that I need to send a series of keystrokes to. I need to Alt-Tab back and forth between the apps, and I'd like to be able to reduce the number of keystrokes from six to one.
I start out with the first window active, and type:
Alt-Tab //makes second window active
Right Arrow //
Alt-Tab //makes first window active
Rinse and Repeat.
I know this doesn't sound like much, but I might have to do this a couple thousand times! If I could reduce this task from 12,000 keystrokes down to pressing a single button 2,000 times, I'd be very grateful!
I'm wondering if I find out my application's PIDs, if I can then use expect to send the keystrokes to those PIDs?