FileWrite(fh,"These applications load automatically on startup:")
FileWrite(fh,"")
goto CheckRun
:CheckRun
if x != param0 then goto MakeRun
if x == 0 then goto AddLoad
goto CheckMenu
:MakeRun
x=x+1
if x > 9 then goto ToMany
FileWrite(fh,param%x%)
goto CheckRun
:ToMany
Message("To many items on Load Line","You have attempted to exceed the maximum of 9 items on the load line!")
goto CheckMenu
:CheckMenu
FileWrite(fh," ")
FileWrite(fh,"[add^1Add a program]")
FileWrite(fh,"[add^2Remove a program]")
FileWrite(fh,"[add^3Save changes and exit]")
FileClose(fh)
DialogBox("Current load statement","temp.txt")
if add == 1 then goto AddLoad
if add == 2 then goto RemoveLoad
if add == 3 then goto Leave
exit
:RemoveLoad
Delitem=ItemSelect("Select item to remove...",CurrLoad," ")
CurrLoad=StrReplace(CurrLoad,Delitem,"")
Count=ParseData(CurrLoad)
if Count == 0 then goto LastItem
goto Start1
:AddLoad
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)","")
a = FileExist(file)
if a == @FALSE then goto AddError
CurrLoad=StrCat (CurrLoad," %file%")
goto Start1
:AddError
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.")
goto AddLoad
:NeedForFirstItem
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")
if rcc == @YES then goto AddLoad
if rcc == @NO then exit
if rcc == @CANCEL then exit
:LastItem
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.")