home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d02xx / d0214.lha / RunBack / README.peck < prev    next >
Text File  |  1989-05-30  |  3KB  |  74 lines

  1. /* 
  2.  
  3. --------------
  4. runbackground.c  
  5. ---------------
  6.  
  7. SUMMARY:  A Workbench Disk can be used to autostart an application
  8.       through the use of the startup script and close the startup CLI.
  9.  
  10.  
  11. Users have commented that it is not possible to start a process going 
  12. from the startup script and then cause the initial CLI to go away.   
  13. Here is the solution to that problem, named appropriately:
  14.  
  15.     RUNBACKGROUND
  16.  
  17. which starts and runs a background task.  This does indeed allow you to
  18. create a startup script that will set up your workbench running any
  19. programs you might wish, removing the initial CLI in the process.
  20.  
  21. Your s/startup-sequence can contain lines such as the following:
  22.  
  23.     RUNBACKGROUND -3 clock
  24.     RUNBACKGROUND utilities/calculator
  25.     RUNBACKGROUND -5 utilities/notepad
  26.  
  27. where RUNBACKGROUND is the command and the second parameter is the filename
  28. which may be preceded by a flag-variable that specifies an optional delay 
  29. time.  The delay can be from 0 to 9, for the number of seconds that 
  30. the startup script should sleep while allowing the background task to 
  31. load and start.  I've put that in to minimize thrashing of the disk as it
  32. tries to load several projects at once.
  33.  
  34.  
  35. LIMITATIONS:
  36.  
  37.     The program that you run cannot require any input from an interactive
  38.     CLI that starts it.    Additionally, you cannot specify any file 
  39.     redirection in the command line since this program provides the
  40.     redirection for you already.  If you need to use redirection for
  41.     your command, you can modify the source code where shown, thus
  42.     allowing the redirection to become one of the parameters passed
  43.     through to your program.
  44.  
  45.     RUNBACKGROUND does pass your command line parameters to the program
  46.     you wish to start, but limits the total length of your command
  47.     string to 227 (255 minus the 28 characters for "RUN >NIL: <NIL: " 
  48.     preceding your own file pathname and ">NIL: < NIL: " following it.)
  49.  
  50.  
  51. LINKING INFORMATION:
  52.  
  53.     (Amiga/Lattice C)    use -v option for pass 2   (lc2 -v filename.q)
  54.             to disable stack checking code installation.
  55.             (stack checking code sometimes is incorrect).
  56.  
  57.     FROM lib:Astartup.obj runbackground.o
  58.     TO runbackground
  59.     LIBRARY lib:amiga.lib, lib:lc.lib
  60.  
  61.     ****************************  NOTE:  ********************************
  62.     If you use Lstartup.obj, it won't let the startup CLI go away. This is
  63.     because the source code for Lstartup.asm either opens its own window 
  64.     or uses an existing CLI window (Open("*",....)), so that it has some 
  65.     guaranteed place to put the output.   Astartup.obj does not do this.
  66.     *********************************************************************
  67.  
  68. Hope this helps.
  69.  
  70.  
  71. robp.
  72. */
  73.  
  74.