home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Special / chip-cd_2001_spec_05.zip / spec_05 / scripts.cab / demo2.kix < prev    next >
Text File  |  1999-11-04  |  987b  |  55 lines

  1. ;  DEMO2.SCR
  2. ;
  3. ;  KiXtart demonstration script of registry functions.
  4. ;
  5. ;  24-Aug-1995
  6. ;
  7. ;  Note :  This code sample is provided for demonstration purposes only.
  8. ;          Microsoft makes no warranty, either express or implied,
  9. ;          as to its usability in any given situation.
  10. ;
  11.  
  12. cls                                   ; clear the screen
  13. color b+/n
  14.  
  15. ? "START" ?
  16.  
  17. :start
  18.  
  19. color g+/n
  20. ? "Please enter the name of the key of which you want to display a value : "
  21. color w+/n
  22. ? gets $key
  23.  
  24. if $key = ""
  25.    goto end
  26. else
  27.    color g+/n
  28.    ? "Please enter the name of the value you want to display : "
  29.    color w+/n
  30.    ? gets $value
  31.  
  32.    $result = readvalue( $key , $value )
  33.    if @error = 0
  34.       color g+/n
  35.       ? "OK, here's the result :"
  36.  
  37.       ? "["
  38.       color r+/n
  39.       "$result"
  40.       color g+/n
  41.       "]"
  42.    else
  43.       color r+/n
  44.       ? "Hmmm, key or value not found ?."
  45.    endif
  46. endif
  47.  
  48. :end
  49.  
  50. color b+/n
  51.  
  52. ? ? "END"
  53.  
  54. color w/n
  55.