From: Watanabe Carcass Date: 2007-05-11T22:37:01+09:00 Subject: Re: from REALbasic > Terminal > RUBY ?! Finally!!! This simple test is working as follow: >>>> REAL CODE <<<< Dim s as New Shell Dim cmd as String Dim t1 as String Dim t2 as String t1 = EditField1.Text t2 = EditField2.Text #if TargetMacOS or TargetLinux and Not( TargetMacOSClassic) cmd="cd /Applications/hello-ruby ; ruby ruby-test.rb " + "'"+t1+"'" + " " +"'"+t2+"'" #elseif TargetWin32 cmd="set" #endif s.execute cmd if s.errorCode=0 then EditField3.text=s.Result else EditField3.text="Error "+ Str(s.ErrorCode) end if Yeah I know the multiple quotation marks looks awkward in the cmd... line but it was the only thing that I came up with to allow the terminal passing the t1 and t2 strings when these have have more than one word(spaces in between). The ruby script [ruby-test.rb] puts both arguments into a single line as follows: >>>> RUBY CODE <<<< puts "#{ARGV[0]} #{ARGV[1]}" I know this is simple (many things are missing) and that REALbasic can concatenate, but! this is just a test. I dunno how REAL or RUBY are gonna behave with a more complex example, but it's a beginning!! I'll have to learn about sockets. Advices? Comments? -- Posted via http://www.ruby-forum.com/.