I was making a program and then one thing popped in my mind: Is there a
function in Ruby that gives you the chance of that when somebody is
running the program and it stands 'Press any button to continue' that he
could press any button, the 'Press any button to continue' would
disappear and the program would start?
On 2/25/07, Helgitomas Gislason <nitrohelgso@hotmail.com> wrote:
Hey all!
I was making a program and then one thing popped in my mind: Is there a
function in Ruby that gives you the chance of that when somebody is
running the program and it stands 'Press any button to continue' that he
could press any button, the 'Press any button to continue' would
disappear and the program would start?
--
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important
things.
-Anonymous
There's the ruby/ncurses module which ships with ruby. require
'curses' to use it, and the function you're looking for is
Curses.getch(). Documentation seems to be a bit sparse, though.
martin
···
On 2/26/07, Helgitomas Gislason <nitrohelgso@hotmail.com> wrote:
This is a highland program or something, I want to know if I can use
ruby without installing any update to it.
This is a highland program or something, I want to know if I can use
ruby without installing any update to it.
This problem is not a trivial one, I fail to know if Highline is a
pure Ruby module in which case you can study the relevant parts of
Highline to learn how to do it, but it might be that the functionality
you are looking for is a C-extension.
I feel that you should just use Highline in the later case, just my micromoney.
HAND
R.
···
On 2/26/07, Helgitomas Gislason <nitrohelgso@hotmail.com> wrote:
--
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important things.
-Anonymous