views:

116

answers:

2

I'm working on a GUI for Windows XP. Everything works great, except when I run an external command through backticks, %x(), IO.popen, etc, I get a DOS window that pops up for a split second. I know this doesn't happen when I've developed on OS X and Linux. Any ideas on how to get rid of it? (Or at least hide it?)

I'm using rubyw 1.8.6 (the "GUI version" of Ruby for Windows) and GTK2 for the interface.

A: 

You can use the Win32API module, and call the windows api CreateProcess Function. It ain't pretty.

Igal Serban
Thanks for your response. I tried this -- maybe I was doing it wrong, but I still saw the same behavior. My solution in the end was a workaround. The information I needed was actually already stored on the filesystem (so I just read it in as a file), but this wasn't immediately obvious before.
Benjamin Oakes
If you ever do solve this then please tell!
Jonas Elfström
A: 

As mentioned in a comment, I never found a solution to this. In this particular circumstance, the information I needed was actually already stored on the filesystem (so I just read it in as a file). This wasn't immediately obvious before, and isn't likely to come up in all circumstances.

If anyone finds a "true" solution, I would be interested in hearing about it.

Benjamin Oakes