Path: utzoo!attcan!uunet!husc6!bbn!oberon!pollux.usc.edu!papa From: papa@pollux.usc.edu (Marco Papa) Newsgroups: comp.sys.amiga Subject: Re: FULLY INTERACTIVE SCRIPTS (A Tutorial) Message-ID: <9137@oberon.USC.EDU> Date: 17 May 88 17:17:37 GMT References: <8922@oberon.USC.EDU> <9927@agate.BERKELEY.EDU> <4697@watdcsu.waterloo.edu> Sender: news@oberon.USC.EDU Reply-To: papa@pollux.usc.edu (Marco Papa) Organization: Felsina Software, Los Angeles, CA Lines: 67 In article <4697@watdcsu.waterloo.edu| discat@watdcsu.waterloo.edu (G. Strachan Elec. Eng.) writes: |In article <9927@agate.BERKELEY.EDU| pete@violet.berkeley.edu.UUCP (Pete Goodeve) writes: ||[Marco Papa writes (in <8922@oberon.USC.EDU|) about his program "getline" ||to be used with XICON...] ||Yeah!! Many thanks, Marco! I've been meaning to to write a "stupid little ||program" like that since I first wrote xicon, but somehow I never got to ||it. As usual, the first person who REALLY needs it is the one who has ||to write it... ||Anyhow, it nicely fills the "Interaction Void" in that area. | |A while back I discovered that you can in fact create interactive scripts |from the CLI without the need for little programs to print the message and |read in the input etc. I figured that it was fairly obvious and everyone |else knew it too. Now I am not so sure because people still seem to use |these input programs. If this is obvious I apologize. Anyway here is how |it works. Ever wondered why Amigados scripts require you to specify the |number and name of arguments the script needs? It needs this so the |Execute program can tell the user what the required parameters are if he |asks with the '?' command. Now once the Execute has printed out the required |parameters it reads from standard input to get the parameters. So this can |be used to build an interactive script. For example here is my startup |sequence script. | |path sys:system add |path sys:utilities add |path sys:my_commands add |BindDrivers |mount pipe: |Execute sys:s/loader ? | |where the script file loader is: | |.key "Load WorkBench (y/n)" |if