Run command in command prompt from Ruby application

Posted by Julian on Programmers See other posts from Programmers or by Julian
Published on 2013-10-17T15:28:39Z Indexed on 2013/10/17 16:22 UTC
Read the original article Hit count: 392

Filed under:
|

I have a command-line Ruby application that uses Curses to create a GUI. This GUI is absolutely mangled by Windows' command prompt if the command prompt window is too small.

The command prompt window can be resized in properties. However, I want to resize it programatically.

Running this command in the command prompt (nothing to do with Ruby) will resize the command prompt window to desired variables.

mode con:cols=120 lines=40

Can I do this purely in Ruby?

Or, failing that (I suspect doing it purely in Ruby may be impossible) can my ruby application actually run that command and 'hit enter', and resize window it's running in?

© Programmers or respective owner

Related posts about ruby

Related posts about command-line