[squeak-dev] Re: calling a external executable

Levente Uzonyi leves at elte.hu
Wed Jan 12 16:58:40 UTC 2011


On Wed, 12 Jan 2011, arunabh2k wrote:

>
> Hi Richo,
>
> Thanks for the direction I was able to call external executable through
> processwrapper in windows.
> I hope this would be able to work on linux/Mac as well but currently I am
> more focused on windows.

It works on windows only. I wrote this package, because with OSProcess you 
can't access the started process' standard streams on windows (it works on 
other platforms). ProcessWrapper could be ported to other platforms, but 
fixing OSProcess on windows would be better IMHO.

If you just want to start a new process and don't want to communicate with 
it via the standard streams, then you can also use OSProcess, FFI or 
SystemPlugin from BYOB on windows.


Levente

>
> As I was new in this, I would like to sum-up the steps which I did to make
> it work:
> 1. Copy the processWrapperplugin.dll to the directory where my squeak.exe
> exist.
> 2. go to menu and check the files list browse to the processWrapper.1.cs
> provided by Richo and apply the change.
> 3. Use following code:
> ProcessWrapper new useStdout;
> startWithShellCommand: 'path_to_executable\executable.exe';
> upToEnd;
> waitForExitFor: 5000;
> exitCode.
>
> And this did the part of calling the executable which I was having. Also I
> was using squeak vm version 3.11.5.
> I now have to make changes as per my requirement.
>
> Special Thanks to Richo, Dave, Bert, Jens, Levente as this was POC for me
> and now I can go forward about learning scratch/squeak programming.
>
> Jens I would still look forward for your solution.
>
> Thanks,
> Arunabh
>
> -- 
> View this message in context: http://forum.world.st/calling-a-external-executable-tp3207051p3213893.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>



More information about the Squeak-dev mailing list