home *** CD-ROM | disk | FTP | other *** search
- ASK Version 1.1 - January 7, 1987 - ©1987 Sean Riddle
- Oklahoma City Amiga Computer Enthusiasts BBS: (405) 631-9040
-
- Usage: ASK <default> <time> <prompts>.
-
- ASK is a public domain utility program that gets Y/N input from the keyboard
- within a certain time limit and returns either 0 (for Y) or 5. This return
- value can be used from within an EXECUTE'd sequence file to control flow.
- Version 1.1 of ASK supports a selectable timeout value (from 1-60 seconds,
- or infinite), a timeout default of either Y or N, and is much smaller than
- the older ASK (this one's about 4K.) You can invoke ASK directly from the
- CLI, although it has limited use. A better way to use ASK is from within a
- sequence file, such as startup-sequence. For instance, to see if the user
- would like a listing of the current directory, you could use this:
-
- ASK Y 10 Do you want a directory?
- IF WARN
- SKIP no
- ENDIF
- dir
- LAB no
-
- What this does is print the string "Do you want a directory? ". Then ASK
- waits for 10 seconds. If you input Y, ASK returns a 0 and the directory is
- output. If you input N, ASK returns a 5, which is a WARNing error, causing
- the sequence to SKIP to the LABel no. If you do not type anything before
- the 10 second time limit expires, ASK will default to Y, and return a 0.
- Note that either upper- or lower-case may be entered, you must hit return
- after Y or N, and that any extra characters on the line will be ignored. If
- you input characters other than Y or N, the program will reset the time
- limit and complain.
-
- You can use ASK in the startup-sequence to ask you if you want a RAM disk or
- not; if you want Workbench or the CLI to come up; if you want your 5 1/4"
- drive to be mounted or not.
-
- Look at the AmigaDOS User's Manual at the EXECUTE, IF, SKIP, and LAB
- commands.
-
- This code represents quite a little bit of time I spent programming and
- debugging. I don't mind you modifying the code, but please leave in my
- information. I'd also like you to upload the new code and source to the OKC
- ACE BBS (number above). Please give this code to everyone, upload it on
- every BBS, send it everywhere. What good is it if nobody uses it? Lastly,
- if you really like the program or use it a lot, please send a small donation
- to help me pay for my Amiga.
-
- Thanks-
- Sean Riddle
- 2636 Manchester Drive
- OKC, OK 73120-3313
-
-
-