Ask A Question

Notifications

You’re not receiving notifications from this thread.

Sending a series of keystrokes to the terminal. (CentOS)

MaxwellMax asked in Ruby

Hi there, I'm just trying to automate a process. We use a command line tool which is navigated by keystrokes (no mouse).

I was hoping to create a ruby script to send the required keystrokes to that tool, and am asking for your help on how to do that basic thing.

It's easy enough to start the program; system 'programName', but after that the script is hung until you exit the program.

I suspect the answer is something like 'create a new thread and send the keys' but I'm not sure how to do that.

thanks for any help you can provide

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.