On 26. Apr 2007, at 15:12, Brett Terpstra wrote:
I had been setting a variable to the open() command, but I think that it returns nil, doesn't it? How do I get the return value from the dialog into a variable using this method? Or is that not the problem...?
When you want to both send and receive stdin/out to/from a command, you need to use popen3.
For example like this (untested):
require "open3"
Open3.popen3('"$DIALOG" -m select_photoset') do |stdin, stdout, stderr| stdin << plist; stdin.close res = PropertyList::load(stdout) end