Run command in command prompt from Ruby application
- by Julian
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?