From: "rolfedh@..." Date: 2006-02-23T03:53:32+09:00 Subject: Re: Telnet question As a relative newbie, I was frustrated by the lack of good documentation/comments for RExpect. It seems from other postings to this list that RExpect doesn't play well with Windows. I decided to use a different approach explained in a separate reply to this thread. require 'net/telnet' require 'time' t = Time.now this_time = t.strftime("%y_%m_%d_%H_%M_%S") tn = Net::Telnet.new( 'Host' => '192.168.47.150', "Output_log" => "./logs/" + this_time + ".txt") { |str| print str } sleep 1 tn.puts("operator") { |str| print str } sleep 1 tn.puts('janus') { |str| print str } #Skip line with no prompt that appears after logging in tn.puts '' #Time zone offset tn.puts("F1") sleep 1