home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Educate / Educate.zip / radf100.zip / RESIDENT.CMD < prev    next >
OS/2 REXX Batch file  |  1995-07-24  |  863b  |  42 lines

  1. /* external functions for THE RESIDENT */
  2.  
  3. /* first get the function to execute */
  4. /* there is only one function, but send it as an arguement, */
  5. /* just to keep the style correct */
  6.  
  7. Parse Arg Tag, Arg
  8.  
  9. If Tag \= "Police" Then return "error"
  10.  
  11. Interpret "Signal" tag
  12.  
  13. end
  14.  
  15. Police:
  16.  
  17. /* bring up a window to ask for the Badge # */
  18.  
  19. b.0 = 2
  20. b.1 = "OK"
  21. b.2 = "Cancel"
  22. x = VRPrompt(VRWindow(),"Badge #:", y, "Locker Security", "b.", 1, 2)
  23.  
  24. /* quit if the player hit cancel */
  25.  
  26. If x = 2 Then Return 0
  27.  
  28. /* bring up a window to ask password */
  29.  
  30. x = VRPrompt(VRWindow(), "Password:", z, "Locker Security", "b.", 1, 2)
  31.  
  32. /* return 1 if y=8356 and z= "SUZIE" */
  33.  
  34. /* first translate Z to all upper case */
  35.  
  36. z = Translate(z, XRange("A", "Z"), XRange("a", "z"))
  37.  
  38. /* do the check */
  39.  
  40. If (y = 8356) & (z = "SUZIE") Then Return 1
  41.  
  42. return 0