Was using highline for a program I am making for learning/fun. I got it
working perfectly but I have made it hit a limit which I don't know how
to get past. I want it to be able to use get_charter outside the
Is this possible with highline or is there another library I can use
that will have this ability?
char = 0;
while char.chr != "z"
char = get_character
if char.chr == "a"
elsif char.chr == "s"
elsif char.chr == "d"
elsif char.chr == "f"
print "Now exiting"
Posted via http://www.ruby-forum.com/.
On Oct 9, 2010, at 1:19 PM, Ruby Program wrote:
> Was using highline for a program I am making for learning/fun. I got =
> working perfectly but I have made it hit a limit which I don't know =
> to get past. I want it to be able to use get_charter outside the
HighLine is really focused towards console interactions, so it probably =
won't be of much help outside of that environment.
If you are wanting to read characters off of some IO-like interface for =
Ruby getc() may help. If you mean that you wish to capture keystrokes =
in a GUI environment, you'll need to look at a windowing toolkit.
I hope that helps.
James Edward Gray II=
|All times are GMT. The time now is 12:36 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.