<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><span><div>Thanks for your help.</div><div><br></div><div>So far, I've had :<br></div><div><br></div><div>a) lots of "primitive failed", most of the time <span>primitiveFileAtEnd (FilePlugin)</span><br></div><div>b) An error/warning message in the console, "<span>VirtualProtect(x,y,PAGE_EXECUTE_READWRITE): No error" and then nothing happens, not even a prompt!</span></div><div><span>c) A "Manufactured file handle detected" error</span></div><div><span>d) An emergency error handler</span></div><div><span>e) An error saying "stdout is not open"</span></div><div><span>f) the VM terminating abruptly</span></div><div><span>g) The "Squeak Cog Spur Virtual Machine" unresponsive and totally frozen (not even able to interrupt it!)</span></div><div><span><br></span></div><div><span>I tried the original and some refactored (VERY simple snippets) examples I could find on the net using :<br></span></div><div><span><br></span></div><div><span>a) OSProcess</span></div><div><span>b) FileStream</span></div><div><span>c) StdioListener</span></div><div><span><br></span></div><div><span>I have tried all tips & tricks : <br></span></div><div><span>a) load the "application code" from a script</span></div><div><span>b) doIt the code in a workspace and save the image</span></div><div><span>c) doIt some code with code to save the image first so the rest of the doIt resumes at startup</span></div><div><span>d) I tried so many things I don't remember it all!!<br></span></div><div><span><br></span></div><div><span>So
 far, nothing worked, not even was I once close !  Except for the 
example with StdioListener : it shows the prompt but does nothing with 
the input...<br></span></div><div><span><br></span></div><div><span>I'm using Squeak 5.1 32bit on Windows 10.</span></div><div><span><br></span></div><div><span>My
 goal is to produce a headless application is a *simple* way.  It can be a
 script or some code I execute in a workspace.  Then save the image (or 
whatever step is required).  </span></div><div><span><br></span></div><div><span>When running the application, I
 don't want to have to specify a script to start it up from
 the console.  Also, I don't want to open another command window!  I 
want the app/image to run from the command window without any 
artifact/trick the same way any other Windows utility/app would work.  I
 also want the application to be interactive (it waits for input, does 
something with the input, then shows result and presents me with a 
prompt again).</span></div><div><span><br></span></div><div><span>Once I get this to work, you can be sure I'll document it in detail !!!!<br></span></div><div><span><br></span></div></span><div><br></div><div><br></div><div class="ydpce7852aesignature">----------------- <br>BenoĆ®t St-Jean <br>Yahoo! Messenger: bstjean
 <br>Twitter: @BenLeChialeux
 <br>Pinterest: benoitstjean
 <br>Instagram: Chef_Benito<br>IRC: lamneth
 <br>Blogue: endormitoire.wordpress.com
 <br>"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)</div></div>
            <div><br></div><div><br></div>
            
            <div id="ydp12bd96e6yahoo_quoted_3489403789" class="ydp12bd96e6yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Friday, April 6, 2018, 5:42:27 p.m. EDT, tim Rowledge <tim@rowledge.org> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div dir="ltr"><br clear="none"><br clear="none">> On 06-04-2018, at 11:10 AM, Alistair Grant <<a shape="rect" href="mailto:akgrant0710@gmail.com" rel="nofollow" target="_blank">akgrant0710@gmail.com</a>> wrote:<br clear="none">> <br clear="none">> Hi Benoit,<br clear="none">> <br clear="none">> On 6 April 2018 at 12:16, Benoit St-Jean via Squeak-dev<br clear="none">> <<a shape="rect" href="mailto:squeak-dev@lists.squeakfoundation.org" rel="nofollow" target="_blank">squeak-dev@lists.squeakfoundation.org</a>> wrote:<br clear="none">>> Is there any way I can start squeak from a command window, *headless*, and<br clear="none">>> WITHOUT providing a script and have an interactive application^  Say, for<br clear="none">>> instance, my application waits for input and answers back the square of the<br clear="none">>> number I type in?<br clear="none">>> <br clear="none">>> I've tried a gazillion examples I found and it just doesn't work at all...<br clear="none">>> <br clear="none">>> I'm on Windows 10 if that helps.<br clear="none">> <br clear="none">> <a shape="rect" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/image/buildspurtrunkreaderimage.sh" rel="nofollow" target="_blank">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/image/buildspurtrunkreaderimage.sh</a><br clear="none"><br clear="none">Just for the record here for the future - this process <br clear="none">a) simply loads the CogTools-Listener (sub)package from the VMMaker repository - which is a very small bit of code we could very sensibly include in the default image<br clear="none">b) uses a simple initial script to create an image that will start up at the beginning of an incantation that loops around the StdioListener. All you do is start up the image saved after loading the Listener tools with the StartReader.st - subsequent runs do not need that.<br clear="none"><br clear="none">Unfortunately it doesn't seem to be working quite right on my Pi at the moment; I get a "squeak>" prompt but it doesn't seem to ever read any input. I know it works in principle because I've used it plenty of times in the past , but clearly I'm forgetting some important detail.<div class="ydp12bd96e6yqt1027103668" id="ydp12bd96e6yqtfd74626"><br clear="none"><br clear="none">tim<br clear="none">--<br clear="none">tim Rowledge; <a shape="rect" href="mailto:tim@rowledge.org" rel="nofollow" target="_blank">tim@rowledge.org</a>; <a shape="rect" href="http://www.rowledge.org/tim" rel="nofollow" target="_blank">http://www.rowledge.org/tim</a></div><br clear="none">Useful Latin Phrases:- Te audire no possum. Musa sapientum fixa est in aure. = I can't hear you. I have a banana in my ear.<div class="ydp12bd96e6yqt1027103668" id="ydp12bd96e6yqtfd71464"><br clear="none"><br clear="none"><br clear="none"><br clear="none"></div></div></div>
                </div>
            </div></div></body></html>