From: Ryan Allan Date: 2008-05-30T02:47:57+09:00 Subject: ShellExecute and Win32OLE callback Hi everybody, I'm trying to add a callback to a ShellExecute call. (Or at least get some way to find out when it finishes running.) I'm not having any luck with WIN32OLE_EVENT, and all the examples I can find use Internet Explorer or Excel. The code: shell=WIN32OLE.new('Shell.Application') shell.ShellExecute(file_to_use, arguments, directory, operation, show) #All of these arguments are defined earlier. This call does what I want. callback=WIN32OLE_EVENT.new(shell, "Quit") callback.on_event("Quit"){|*args| do_something} #do_something is defined earlier. No matter what is in place of "Quit", even nil, it says "interface not supported" and refuses to run. Any suggestions? (It doesn't have to use the event class, I only need to know when the ShellExecute process ends.) This application is limited to core Ruby, no gems. Thank you very much, -Ryan -- Posted via http://www.ruby-forum.com/.