home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / k95 / k95.ini < prev    next >
Text File  |  2020-01-01  |  3KB  |  104 lines

  1. ; K95.INI - Standard Kermit 95 initialization file.
  2. ;
  3. ; This file sets up the standard and expected environment for Kermit 95.
  4. ; Please don't edit this file.  Make any desired customizations in the
  5. ; K95SITE.INI and/or K95CUSTOM.INI file, which is executed by this file.
  6. ;
  7. ; . Sets up EDITOR if necessary
  8. ; . Defines NETEDIT macro
  9. ; . Executes customization file
  10. ;
  11. ; V2.4, Feb 2002
  12. ; K95 1.1.21 or later required:
  13. ; . Eliminates old dialing directories.
  14. ; . Updates customization file search.
  15.  
  16. if < \v(xversion) 1121 {
  17.     stop 1 Sorry - This version of K95.INI requires K95 1.1.21 or later.
  18. }
  19. echo EXECUTING STANDARD K95 INITIALIZATION FILE:
  20. echo
  21. echo " \flongpathname(\fpathname(\v(cmdfile)))"
  22. echo
  23.  
  24. ; Dialing and Network directories
  25. ; (THESE ARE OBSOLETE)
  26. ; set dial directory ckermit.kdd cis.kdd sprint.kdd tymnet.kdd genie.kdd
  27. ; set netw directory ckermit.knd
  28.  
  29. ; Editor
  30.  
  31. if def \v(editor) forward netedit     ; Picked up from registry?
  32.  
  33. ; Set up the default editor for the EDIT command.  If you would rather use
  34. ; a different editor, then either define an EDITOR environment variable, or
  35. ; add a SET EDITOR command to your K95CUSTOM.INI file to override this one.
  36. ;
  37. if not def \$(EDITOR) {
  38.     if def \$(SystemRoot) {                    ; Windows NT
  39.         set editor \$(SystemRoot)\\NOTEPAD.EXE
  40.     } else {
  41.         if def \$(windir) {                    ; Windows 95
  42.             set editor \$(windir)\\NOTEPAD.EXE
  43.         } else {
  44.             echo "ERROR setting default editor name --"
  45.             echo Failure to locate the needed Windows Environment variables  
  46.         }
  47.     }
  48. }
  49.  
  50. :NETEDIT
  51.  
  52. ; NETEDIT macro -- See UPDATES.DOC for an explanation.
  53. ;  
  54. def _NETEDIT {
  55.     switch \v(protocol) {
  56.       :kermit,   output kermit -s \%1\13, break
  57.       :zmodem,   output sz -a \%1\13, break
  58.       :ymodem,   output sb -a \%1\13, break
  59.       :ymodem-g, output sb -a \%1\13, break
  60.       :xmodem,   output sx -a \%1\13, break
  61.       :default, end 1 "\v(protocol)" - protocol unexpected
  62.     }
  63.     receive \%1
  64.     if fail end 1 "\%1" - Download failed
  65.     edit \%1
  66.     if def WAIT_FOR_EDITOR getok
  67.     if not exist \%1 end 1 -
  68.       File "\%1" missing after edit - Did you change its name\?
  69.     set file type text
  70.     send \%1
  71.     asg status \v(status)
  72.     delete \%1
  73.     if not = \m(status) 0 end 1 Upload failed
  74.     end 0
  75. }
  76.  
  77. def NETEDIT {
  78.     local mode current
  79.     asg mode \v(ftype)            ; Save things
  80.     set term autodownload off
  81.     asg current \v(directory)
  82.     if def \v(download) cd \v(download)
  83.     do _netedit \%1            ; Execute the macro
  84.     asg status \v(status)
  85.     set term autodownload on        ; Restore things
  86.     cd \m(current)
  87.     set file type \m(mode)
  88.     end \m(status)            ; Return
  89. }
  90.  
  91. :CUSTOM ; Locate and execute the Site or User-specific customization file.
  92.  
  93. if exist \v(inidir)K95SITE.INI take \v(inidir)K95SITE.INI
  94. else if exist \$(K95CUSTOM) take \$(K95CUSTOM)
  95. else if exist \v(appdata)K95CUSTOM.INI take \v(appdata)K95CUSTOM.INI 
  96. else if exist \v(inidir)K95CUSTOM.INI take \v(inidir)K95CUSTOM.INI 
  97. else if exist \v(exedir)K95CUSTOM.INI take \v(exedir)K95CUSTOM.INI 
  98.  
  99. if < \v(ntime) 43200 echo Good Morning, smile!
  100.   else if < \v(ntime) 61200 echo Good Afternoon, smile!
  101.   else echo Good Evening, smile!
  102.  
  103. end ; of K95.INI
  104.