Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!dlb!ardent!rap From: rap@ardent.UUCP (Rob Peck) Newsgroups: comp.sys.amiga Subject: Re: Input from keyboard in startup-sequence Message-ID: <326@ardent.UUCP> Date: 9 Mar 88 18:20:53 GMT References: <820@umbc3.UMD.EDU> <3397@cbmvax.UUCP> <2868@omepd> <26589@aero.ARPA> Distribution: na Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 59 Summary: You don't need ASK - there is an alternative In article <26589@aero.ARPA>, foy@aero.ARPA (Richard Foy) writes: : In article <3668@cup.portal.com> roger@cup.portal.com writes: : > : >Funny, MY 1.2 WorkBench disk has ASK on it. In the C subdirectory. : : Is it possible to get this ASK command for the A1000? There is an alterative to using ASK, as I have seen in a menu driven kinda startup once posted by Andy Finkel. To paraphrase what was in that file, you could use the following sort of thing to substitute for ASK (though the user WOULD have to press after a Y or N) .key parm1,parm2,test .def test "" .def parm1 "filler" .def parm2 "filler" ;make sure that parm1 and parm2 positions are filled ;to make the call to execute find "bad" in the right ;position. ;(this file itself is named "myex") IF "" EQ "bad" SKIP askquit ;bad quit response answer first time around ENDIF ;Here put the rest of the statements that lead up to the ask quit. ; (the things that use "" and "") LAB askquit ECHO "Do you want to quit? (Y/N, then press RETURN)" SKIP <* >NIL: ? ECHO "Incorrect response, try again" C:EXECUTE myex bad LAB Y LAB y QUIT 0 LAB N LAB n ;here put the continuation code. To have more than one of these in the file, you could vary the response from Y and N to OK/NO or whatever. Point is, you can do something similar to ASK without having ASK available. The SKIP <* >NIL: ? 1. The <* says take the input from the CLI 2. the ? says that this becomes an interactive command, and normally would present the user with the prompt "LABEL:" 3. the >NIL: prevents the interactive prompt output from 2. Thanks, Andy, for providing the menu example. I have found it quite useful. Somehow the above never quite occurred to me until I saw the menu thing. Disclaimer - from memory. Machine and EXECUTE command are not where I am now. Rob Peck ...ihnp4!hplabs!ardent!rap