Thread を使ってファイルを開く
ファイルの終了待ちにならないように
スレッドを使ってファイルを開く
path = "D:/XXX/sample.txt" ftype = `assoc #{File.extname(path)}`.split("=")[1] open_command = `ftype #{ftype}`.split("=")[1] open_command = open_command.sub("%1" , "").sub("\n" , "") Thread.start { system("#{open_command} #{path}") }
script2exe.rb を使って DOS ウインドウを起動しないモードで exe にすると、
DOS画面がチラチラと2回起動する orz
assoc と、ftype の実行時なんだろうけど
どうやったら出なくなるんだろうか・・・。