I’m having difficulty getting any command to work to pick up input from
screen or what looks like a DOS box when I run a script from SciTE. In
following code, which you will recognize as a slightly modified
“basic_client. rb” from Chapter 12 of Beginning Ruby:
#bot = Bot.new(:name => ARGV, :data_file => ARGV)
bot = Bot.new(:name => “No Sam”, :data_file => “bot_data”)
while input = $stdin.gets and input.chomp != ‘end’
puts '>> ’ + bot.response_to(input)
I get the the thing that looks like a DOS Box appear but it is locked up
I am unable to input anything. When I kill it by clicking on the close
button, I get the message:
Hi. I’m No Sam. Want to chat?
Exit code: -1073741510
I have tried just using the gets by itself without the $stdin. with the
failure. Do I have to execute this from outside of SciTE? Then where?
am running Windows XP. Unfortunately, “Beginning Ruby” does a lite job
input from monitors. The way gets is described, on page 203 of the
just does not work.
Anyway, what is the point for SciTE to display the thing that looks like
DOS Box if it is always locked up?
I bet that the problem is something stupid I am not noticing. Enjoy
revealing my ignorance! And thanks.