Win32Shell and ExternalWindowsOSProcess

David T. Lewis lewis at
Fri May 26 21:13:06 UTC 2006

On Fri, May 26, 2006 at 05:21:25PM +0100, Keith McKay wrote:
> I'm looking for some advice
> I have been running programs from within Squeak using both Win32Shell and
> ExternalWindowsOSProcess with some success.  However, I have not been able
> to figure out how to capture the text output from the program to the screen
> into the contents of a PluggableTextMorph.  I can do it by calling the
> program in a batch file and redirecting the output to a file rather than the
> screen, and then reading the file into the PluggableTextMorph.

Hi Keith,

Unfortunately I never completed the implementation of OS pipes for Windows,
so there is no direct way to feed the output of an ExternalWindowsOSProcess
back into Squeak.

> I have also tried running the batch file directly in CommandShell but I get
> a "cannot access system to run 'prog.bat'" error message.  This was done
> more in desperation than with logic.
> Is there a way to capture text output from an external program directly into
> a PluggableTextMorph?

On a unix system, you can do "$ who | edit" in a CommandShell to pipe the
output of the external "who" command (/usr/bin/who) into Squeak. But this
won't work on Windows due to the current lack of OS pipe support.

> Programming isn't my day job, I do this just for fun. I think I am at my
> limit of Squeak knowledge with the above problem so any advice would be
> appreciated.

Me too, Squeak and OSProcess are things I do just for fun. I've put most
of my effort into unix/linux because I find it more entertaining. But Windows
has gotten a lot better in recent years so maybe I should try it again.


More information about the Squeak-dev mailing list