• Re: running a TCL/tk program in different modes

    From et99@21:1/5 to Mark Tarver on Wed Jan 31 01:25:09 2024
    On 1/30/2024 10:58 PM, Mark Tarver wrote:
    I have now constructed a batch file that enables me to run two communicating processes - in principle. The problem now is the way the TCL process is run. Here is the manual way I'm having to do it.

    1. Start TCL/Tk by clicking on WISH which gives me a console window.
    2. Load eventloop.tcl using the console (process A).
    3. Optionally, kill the console.
    4. Open sbcl-shen.exe (process B, with the communicating program preloaded).

    This works. However if I vary this routine as follows.

    1. Load eventloop.tcl by clicking on it (process A).
    2. Open sbcl-shen.exe (process B, with the communicating program preloaded).

    Then I get two windows but process B cannot talk to process A. This two step routine is the routine in my Windows batch file.

    Mark
    From the sound of the file name, eventloop.tcl, is this a small piece of tcl code you're experimenting with? Can you post this file?

    And the .exe, what is that? Do you have its source code; what language is it? What does comm prog preloaded mean? Is it a tclkit/starpak or something else.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et99@21:1/5 to Mark Tarver on Wed Jan 31 10:14:37 2024
    On 1/31/2024 4:31 AM, Mark Tarver wrote:
    On Wednesday 31 January 2024 at 09:25:14 UTC, et99 wrote:
    On 1/30/2024 10:58 PM, Mark Tarver wrote:
    I have now constructed a batch file that enables me to run two communicating processes - in principle. The problem now is the way the TCL process is run. Here is the manual way I'm having to do it.

    1. Start TCL/Tk by clicking on WISH which gives me a console window.
    2. Load eventloop.tcl using the console (process A).
    3. Optionally, kill the console.
    4. Open sbcl-shen.exe (process B, with the communicating program preloaded).

    This works. However if I vary this routine as follows.

    1. Load eventloop.tcl by clicking on it (process A).
    2. Open sbcl-shen.exe (process B, with the communicating program preloaded).

    Then I get two windows but process B cannot talk to process A. This two step routine is the routine in my Windows batch file.

    Mark
    From the sound of the file name, eventloop.tcl, is this a small piece of tcl code you're experimenting with? Can you post this file?

    And the .exe, what is that? Do you have its source code; what language is it? What does comm prog preloaded mean? Is it a tclkit/starpak or something else.

    Nailed it. The problem is in the batch file. I now have

    START /B sbcl-shen.exe
    C:\ActiveTcl\bin\wish.exe "C:\Users\shend\OneDrive\Desktop\Shen\S38\Tk\eventloop.tcl"

    I was using C:\ActiveTcl\bin\wish86t.exe

    Mark


    Glad to hear it. For future reference, I would recommend you get process explorer from here:

    https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

    It's much better tool than windows task manager. I run it at startup so I always have it available.

    In your case, it would have been useful to tell you exactly what the resulting command line is when you (double) click a .tcl file. It can also display the process hierarchy, and the working directory that a program starts up in. You can also get
    visibility into what files it is opening.

    No windows programmer should be without it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)