New to Ruby; need some help

C

catepillar

I am still working with console apps and do not see myself moving away
from command line any time in the near future. However with one of
the apps I am working on, I need something that writes the time in the
bottom right hand corner and updates it every 1 second.
This is the box below (I hope this works lol).
_______________________________________________
| C:\Ruby Programs> ruby Test.rb |
| Enter Number Here: 1
|
| Display stuff
Here |
|
|
|
|
|
7:22:42 PM |
|______________________________________________|

Basically something that looks like that.

I know some C++ and Java, but all the apps I write for those are
GUI... so frankly, I have no idea what to call what I am looking for,
so Google is not much help :(

Thanks for all the help,
Chris Mays
 
H

Howard Roberts

Chris said:
one of
the apps I am working on, I need something that writes the time in the
bottom right hand corner and updates it every 1 second.

Chris,
Two libraries come to mind: ruby-ncurses and highline. I presume from
your C:\ that you are on a Windows platform, so you would have to
download the ncurses source code separately to install the gem, if you
go that route. Someone with more Windows experience might be able to
chime in if you need more info there. The ruby implementation of ncurses
is known (last I heard) to be a bit incomplete, however.

Anyway, have a look at the rdocs and see if either might suite your
needs:

http://allgems.ruby-forum.com/gems/doc/highline/1.5.1
http://allgems.ruby-forum.com/gems/doc/ncurses/0.9.1

HTH,
Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,607
Members
45,240
Latest member
pashute

Latest Threads

Top