Win32Shell and ExternalWindowsOSProcess

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Win32Shell and ExternalWindowsOSProcess

Keith McKay-2
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.

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?

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.

Thanks
Keith McKay
Hamilton, Scotland.

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.1/348 - Release Date: 25/05/2006
 


Reply | Threaded
Open this post in threaded view
|

Re: Win32Shell and ExternalWindowsOSProcess

David T. Lewis-2
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.

Dave


Reply | Threaded
Open this post in threaded view
|

RE: Win32Shell and ExternalWindowsOSProcess

Keith McKay-2
Dave

Thanks for your reply.

If you ever do get round to completing the implementation of OS pipes for
Windows and you are looking for someone to test it, please keep me in mind.

Best Wishes

Keith McKay

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of David T.
Lewis
Sent: 26 May 2006 22:13
To: The general-purpose Squeak developers list
Subject: Re: Win32Shell and ExternalWindowsOSProcess


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.

Dave


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.2/349 - Release Date: 26/05/2006
 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.2/349 - Release Date: 26/05/2006