Maybe this example code helps you (win32 only):
require 'win32ole'
def inputbox( message, title="Message from #{__FILE__}" )
vb_msg = %Q| "#{message.gsub("\n",'"& vbcrlf &"')}"|
vb_msg.gsub!( "\t", '"& vbtab &"' )
vb_msg.gsub!( '&""&','&' )
vb_title = %Q|"#{title}"|
# go!
sc = WIN32OLE.new( "ScriptControl" )
sc.language = "VBScript"
sc.eval(%Q|Inputbox(#{vb_msg}, #{vb_title})|)
#~ sc.eval(%Q|Inputbox(#{vb_msg}, #{vb_title}, aa,hide)|)
end
def popup(message)
wsh = WIN32OLE.new('WScript.Shell')
wsh.popup(message, 0, __FILE__)
end
str = "a | does not break it...\n\nOne\n\tTwo tabbed\nThree..."
res = inputbox( str, "demonstration | title")
popup %Q|When asked\n\n"#{str}"\n\nyou answered:\n#{res}|
This results in:

It follows a popup box with.
See also http://rubyonwindows.blogspot.com/2007/04/ruby-excel-inputbox-hack.html