Yokemate of Keyboards
Posts: 2027 from 2003/2/24
From: po-RNO
Quote:Ginger1 wrote:
I have also tried adding a line to user-startup:
Code:
Execute sys:applications/polyorga/orga
But this doesn't work either. A quick look in an old AmigaDOS book suggests this is just for launching scripts. Run doesn't look quite either.
If you want to launch workbench programs from any kinds of scripts, use the
WBRun command. It changes directory to the executable's location (and thus finds its data files) and runs the program like double clicked from an icon (it reads tooltypes from the icon etc).
Quote:
boot_wb wrote:
One notable exception is where an application requires the network to be active before starting. In this case it may be best to use a script that waits for the network before launching the application, such as:
Waitforport netstat
Run >NIL: path:to/your/executable
You probably meant "waitforport NETSTACK" (typo & case-sensitive)
But I've noticed that at the time when NETSTACK port appears, network isn't properly set yet (IP addresses might not be assigned etc), so I've been using this instead:
WaitForPort inetd.ipc LOOP=30
inetd.ipc is the last port appearing when starting up the TCP/IP stack and network is pretty much up on all aspects at that point. Loop is there to ensure that it'll wait for the network even if there is some delay (likely with wireless networks).
[ Edited by jPV 11.10.2016 - 17:29 ]