Hi guys, been researching about pop up the "open" file dialog of
Windows. I didn't find nothing, just a snippet of code that doesn't
work:


require "win32ole"

cd = WIN32OLE.new("MSComDlg.CommonDialog")

cd.filter = "All Files(*.*)|*.*" +"|Ruby Files(*.rb)|*.rb"
cd.filterIndex = 2

cd.maxFileSize = 128    # Set MaxFileSize

cd.showOpen()

file = cd.fileName      # Retrieve file, path

if not file or file==""
   puts "No filename entered."
else
   puts "The user selected: #{file}\n"
end


 Do you have the way to do that? Thank you.

-- 
Posted via http://www.ruby-forum.com/.