Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!news.cs.indiana.edu!ux1.cso.uiuc.edu!jsivier From: jsivier@ux1.cso.uiuc.edu (Jonathon Sivier ) Newsgroups: comp.sys.amiga.programmer Subject: Re: Waiting for a port in AREXX... Message-ID: <1991Feb18.161428.27886@ux1.cso.uiuc.edu> Date: 18 Feb 91 16:14:28 GMT References: <1991Feb16.073956.24406@news.iastate.edu> Organization: University of Illinois at Urbana Lines: 34 skank@iastate.edu (Skank George L) writes: > Hello folks, I'm writing an Arexx program and I'd like to wait for another >port to appear before the program proceeds. How do you do this in Arexx, all >I can find is WaitForPort. What I'd like is an equivalent Arexx command or >procedure, that is, a command or procedure that will pause the execution of >the script until the port appears. What would be better is one that would wait >for a minute or two then time out if it can't find it. Additionally, is there >a command that will suspend execution of the current Arexx program for X amount >of time, like a pause() or sleep() or wait() function? Any help appreciated. > Thanks, > --George I don't have my manual handy but I thought WaitForPort() did what you want. As for a Wait routine, what I have done is call the AmigaDOS wait command. i.e. address command 'wait 10' /* a 10 second wait */ Do this in a loop checking for a particular condition (existence of a port, another program finishing, etc.) every 5 or 10 seconds. After a specific number of loops (1 or 2 minutes worth) exit the loop and time out. I hope this gives you some ideas. Jonathan ------------------------------------------------------------------- | Jonathan Sivier | Ballo ergo sum. | | jsivier@ux1.cso.uiuc.edu | (I dance therefore I am.) | | Flight Simulation Lab | - des Cartwright | | Beckman Institute | | | 405 N. Mathews | | | Urbana, IL 61801 | | -------------------------------------------------------------------