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
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
我妈不知道我这么屌