The Problem: Thers more then 1 program. i give you the necessary codes:
Starup:
function menue(m)
n=1
k=#m
while true do
term.clear()
term.setCursorPos(1,1)
term.setTextColor(16)
print("ApfelBoot - Pro Bootloader")
term.setCursorPos(1,3)
for i=1, k, 1 do
if i==n then print(i, " ["..m[i].."]") else print(i, " "..m[i].." ") end
end
print("")
print("<Bitte Betribsystem Auswählen!>")
a, b= os.pullEvent()
if a == "key" then
if b==200 and n>1 then n=n-1 end
if b==208 and n<=k then n=n+1 end
if b==28 then break end
end
end
term.clear() term.setCursorPos(1,1)
return n
end
local options={
"ApfelOS",
"CraftOS"
}
local n=menue(options)
print(n)
if n == 1 then
term.clear()
term.setCursorPos(1,2)
term.setTextColor(16)
print(" ApfelOS wird Geladen ")
print(" Bitte warten ")
sleep(1)
term.setCursorPos(1,3)
print(" Bitte warten.")
sleep(1)
term.setCursorPos(1,3)
print(" Bitte warten..")
sleep(1)
term.setCursorPos(1,3)
print(" Bitte warten...")
sleep(1)
term.clear()
term.setCursorPos(1,2)
print(" ApfelOS wird Geladen ")
print(" Bitte warten ")
sleep(1)
term.setCursorPos(1,3)
print(" Bitte warten.")
sleep(1,1)
term.clear()
term.setCursorPos(1,2)
print(" Willkommen! ")
sleep(2,5)
shell.run("ApfelOS/aLogin")
elseif n == 2 then
term.clear()
shell.run("CraftOS/OS")
else
term.clear()
term.setCursorPos(1,1)
term.setTextColor(16)
print("Dies ist ein Fehler im Coding!")
print("Gib bitte Chickenbreadlp von AppleMedia bescheid!")
sleep(5)
os.reboot()
end
Create Folder: ApfelOS
Programms in ApfelOS:
aLogin:
term.setBackgroundColor(8)
term.clear()
term.setCursorPos(1,1)
term.setTextColor(1)
term.setBackgroundColor(2048)
write("ApfelOS 1.0 Pro Alpha 0.57 Login ")
term.setBackgroundColor(512)
print("<Name: klaus Passwort: 12345> ")
term.setBackgroundColor(8)
term.setTextColor(32768)
term.setCursorPos(15,5)
term.setBackgroundColor(16)
print(" Anmelden ")
term.setBackgroundColor(1)
term.setCursorPos(15,6)
print(" ")
term.setCursorPos(15,7)
print(" ")
term.setCursorPos(15,8)
print(" ")
term.setCursorPos(15,9)
print(" ")
term.setCursorPos(15,10)
print(" ")
term.setCursorPos(15,11)
print(" ")
term.setCursorPos(20,7)
write(" User : ")
term.setCursorPos(20,9)
print("Passwort: ")
term.setCursorPos(30,7)
UserName = read()
if UserName == "" then
term.setCursorPos(20,10)
shell.run("ApfelOS/aLogin")
else
end
if fs.exists("ApfelOS/..Benutzer/"..UserName.."") then
term.setCursorPos(30,9)
UserPass = read("*")
if UserPass == "" then
term.setCursorPos(20,10)
shell.run("ApfelOS/aLogin")
else
end
if fs.exists("ApfelOS/..Benutzer/"..UserName.."/"..UserPass.."") then
shell.run("ApfelOS/..Welcome")
else
term.setCursorPos(20,10)
term.setTextColor(16384)
print("Falsches Passwort")
term.setTextColor(1)
sleep(1)
term.setBackgroundColor(8)
term.clear()
term.setCursorPos(1,1)
shell.run("ApfelOS/aLogin")
end
else
term.setCursorPos(20,10)
term.setTextColor(16384)
print("Falscher Benutzername")
term.setTextColor(1)
sleep(1)
term.setBackgroundColor(8)
term.clear()
term.setCursorPos(1,1)
shell.run("ApfelOS/aLogin")
end
term.clear()
term.setCursorPos(1,1)
..Welcome:
term.setBackgroundColor(8)
term.clear()
term.setTextColor(1)
term.setCursorPos(1,1)
term.setBackgroundColor(2048)
print("ApfelOS 1.0 Pro Alpha 0.57 ")
term.setBackgroundColor(512)
print("<Bitte warten!> ")
term.setBackgroundColor(8)
term.setTextColor(1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen /")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen -")
sleep(0.1)
term.setCursorPos(20,7)
print("Wilkommen |")
sleep(0.1)
shell.run("ApfelOS/..Desk")
..Desk:
term.clear()
term.setCursorPos (1,1)
term.setBackgroundColor(2048)
term.setTextColor(1)
print("ApfelOS 1.0 Pro Alpha 0.57 ")
term.setCursorPos(51,1)
term.setBackgroundColor(16384)
print("X")
term.setBackgroundColor(512)
print("<Keine Meldungen verfügbar!> ")
term.setBackgroundColor(8)
print(" X 1.Computer und Disk Speicher öffnen ")
print(" X 2.Aktuelle Zeit ")
print(" X 3.Snake spielen ")
print(" X 4.Random Meldung ")
print(" X 5.Paint ")
print(" X 6.Weitere Informationen ")
print(" X 7.Graustufen Aktivieren ")
print(" X 8.Neuen Benutzer Registrieren ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
term.setBackgroundColor(512)
print("<Weitere Ideen? Bitte über PN an Apple Media> ")
term.setBackgroundColor(2048)
print("(C)Apple Media 2012 - 2013 ")
while true do
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
-- Schliessen
if XY == "51,1" and button == 1 then
shell.run("ApfelOS/aTerm")
break
end
-- Random Meldung
if XY == "5,6" and button == 1 then
shell.run("ApfelOS/aMeldung")
break
end
-- Informationen
if XY == "5,8" and button == 1 then
shell.run("ApfelOS/aInfo")
break
end
-- Zur N Version wechseln
if XY == "5,9" and button == 1 then
shell.run("ApfelOS/aEmu")
break
end
-- Speicher
if XY == "5,3" and button == 1 then
shell.run("ApfelOS/aProg")
break
end
-- Zeit
if XY == "5,4" and button == 1 then
shell.run("ApfelOS/aTime")
break
end
-- Snake
if XY == "5,5" and button == 1 then
term.setBackgroundColor(32768)
term.clear()
shell.run("worm")
break
end
-- Paint
if XY == "5,7" and button == 1 then
shell.run("ApfelOS/aPaint")
break
end
-- Regestrieren
if XY == "5,10" and button == 1 then
shell.run("ApfelOS/..Regist")
break
end end
aTerm:
term.clear()
term.setCursorPos(1,1)
term.setBackgroundColor(2048)
term.setTextColor(1)
print("ApfelOS 1.0 <Pro> !NOT FINAL! Beta 5.5 ")
term.setCursorPos(51,1)
term.setBackgroundColor(16384)
print("X")
term.setBackgroundColor(512)
print("<ApfelOS geht in den Terminal Modus!> ")
term.setBackgroundColor(8)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
term.setBackgroundColor(512)
print(" ")
term.setBackgroundColor(2048)
print(" ")
sleep(3)
term.clear()
term.setCursorPos(1,1)
term.setBackgroundColor(32768)
term.setTextColor(16)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
term.clear()
term.setCursorPos(1,1)
print("ApfelOS 1.0 Pro Terminal ")
print("<Um den Computer Auszuschalten, shut-off eingeben!>")
Create Folder: ..Benutzer
in this Folder create Folder: klaus
in this Folder create Folder: 12345
ready to go! use my instuctions in an older reply!