home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d827 / askreq.lha / AskReq / Example1.bat < prev    next >
DOS Batch File  |  2001-02-25  |  1KB  |  41 lines

  1.     ;-----------  Batch file
  2.  
  3.     Set ANSW `AskReq M "Please tell me your name,|so I know where you are!" S`
  4.  
  5.     ; Opens a requester with only a string gadget and two lines of text
  6.     ; The result will be saved in the variable ANSW
  7.  
  8.     Set AGE `AskReq M "And now tell me your age.|Are you really old enough to ask|me something :-| ?" I`
  9.  
  10.     ; Opens a requester with only an integer gadget and three lines of text
  11.     ; The result will be saved in the variable AGE
  12.  
  13.     AskReq M "So I have got your datas I will now Proceed"
  14.  
  15.     ; Just a notify requester
  16.     ; Now we ask the user if the datas are really correct.
  17.  
  18.     Set ANSW `AskReq M "You told me your name|Is this really your correct name ?" S G $ANSW POS OKAY NEG "FORGET IT"`
  19.  
  20.     If $ANSW EQ ""  ; No name specified
  21.         echo "You want to stay anonymous"
  22.     Else
  23.         echo "You name is"
  24.         echo $ANSW
  25.     Endif
  26.  
  27.     Set AGE `AskReq M "You told me your age|Is this really your age ?" I G $AGE POS OKAY NEG "FORGET IT"`
  28.  
  29.     If $AGE EQ ""  ; No age specified
  30.         echo "You won`t tell me your age"
  31.         return 5
  32.     Else
  33.         echo "You are"
  34.         echo $AGE
  35.         echo "years old"
  36.     Endif
  37.  
  38.     echo "Thank You " $ANSW " for your datas"
  39.  
  40.     ;----------- END
  41.