home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 16 / 16.iso / t / t099 / 2.ddi / LOADRUN.WB$ / LOADRUN.WB
Encoding:
Text File  |  1992-03-20  |  2.1 KB  |  80 lines

  1. :Start
  2. CurrLoad=IniRead("windows","load","")
  3.  
  4. :Start1
  5. CT= ParseData(CurrLoad)
  6. if CT == 0 then goto NeedForFirstItem
  7.  
  8.  
  9. x=0
  10. fh=FileOpen("temp.txt","WRITE")
  11.  
  12. FileWrite(fh,"These applications load automatically on startup:")
  13. FileWrite(fh,"")
  14. goto CheckRun
  15.  
  16.  
  17. :CheckRun
  18. if  x != param0 then goto MakeRun
  19. if x == 0 then goto AddLoad
  20. goto CheckMenu
  21.  
  22.  
  23. :MakeRun
  24. x=x+1
  25. if x > 9 then goto ToMany
  26. FileWrite(fh,param%x%)
  27. goto CheckRun
  28.  
  29. :ToMany
  30. Message("To many items on Load Line","You have attempted to exceed the maximum of 9 items on the load line!")
  31. goto CheckMenu
  32.  
  33. :CheckMenu
  34. FileWrite(fh," ")
  35. FileWrite(fh,"[add^1Add a program]")
  36. FileWrite(fh,"[add^2Remove a program]")
  37. FileWrite(fh,"[add^3Save changes and exit]")
  38. FileClose(fh)
  39. DialogBox("Current load statement","temp.txt")
  40. if add == 1 then goto AddLoad
  41. if add == 2 then goto RemoveLoad
  42. if add == 3 then goto Leave
  43. exit
  44.  
  45. :RemoveLoad
  46. Delitem=ItemSelect("Select item to remove...",CurrLoad," ")
  47. CurrLoad=StrReplace(CurrLoad,Delitem,"")
  48. Count=ParseData(CurrLoad)
  49. if Count == 0 then goto LastItem
  50. goto Start1
  51.  
  52. :AddLoad
  53. file=AskLine("Add file to load statement","Enter the full path and filename: (if you are unable to remember the full path, find it in a drive window)","")
  54. a = FileExist(file)
  55. if a == @FALSE then goto AddError
  56. CurrLoad=StrCat (CurrLoad," %file%")
  57. goto Start1
  58.  
  59. :AddError
  60. Message("File Not Found","The file name that you entered can not be found!  Please check that the file is in the dos path, or that the path that you entered with the file is correct.")
  61. goto AddLoad
  62.  
  63.  
  64. :NeedForFirstItem
  65. rcc = AskYesNo("Ready to Add first item","You don't have any items on the load line.  Would you like to add a program to the load line.  Cancel button will be treated like No")
  66. if rcc == @YES then goto AddLoad
  67. if rcc == @NO then exit
  68. if rcc == @CANCEL then exit
  69.  
  70. :LastItem
  71. rc = AskYesNo("Last Item Deleted","Select YES to Exit and Save changes,  Select No to Add a new item,  or Select Cancel to Exit without saving.")
  72. if rc == @YES then goto Leave
  73. if rc == @NO then goto Start1
  74. if rc == @Cancel then Exit
  75.  
  76. :Leave
  77. IniWrite("windows","load",CurrLoad)
  78. exit
  79.  
  80.