Xref: utzoo comp.lang.rexx:451 comp.sys.amiga.programmer:2563 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!slacvm!wglp09 From: WGLP09@SLACVM.SLAC.STANFORD.EDU Newsgroups: comp.lang.rexx,comp.sys.amiga.programmer Subject: Re: anomalous AREXX behaviour Message-ID: <91100.141226WGLP09@SLACVM.SLAC.STANFORD.EDU> Date: 10 Apr 91 22:12:26 GMT References: <1991Apr9.151344.21097@bnr.ca> Distribution: na Organization: Stanford Linear Accelerator Center Lines: 18 There are so many things wrong with your T1 and T2 that I won't even begin to try to answer them all. But for starters, the run rx simple2 (or whatever it was called) is asynchronous and the first messages likely aren't sent because PORT doesn't exist yet. Secondly, there may be multiple messages waiting on the port. After the WaitPkt, you must loop over them with GetPkt until you get a NULL packet (c2d(0) I seem to remember, or if you have a recent update, the null() function return the kind of NULL you want). Only *then* should you waitpkt again. Try some variations on this to get it to work... You may want to use "WaitForPort" (a program that comes with ARexx) or a loop with a delay to check that "PORT" finally exists before sending it messages. And you need to have some way of telling the second program you're done and that it should exit. Hope this helps for starters... Willy. ---------- Willy Langeveld - Bitnet: WGLP09 @ SLACVM - BIX: langeveld