My problem is now, if I want to start the program "Desktop" the PC immediately is closeing himself
Can someone see my mistake in the codes?
(Sorry for my bad English grammar knowledge)
os.pullEvent = os.PullEventRaw
term.clear()
term.setBackgroundColor(512)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
term.setBackgroundColor(colors.blue)
term.setTextColor(colors.white)
print(" ")
term.setCursorPos(1,18)
term.setBackgroundColor(008800)
term.setTextColor(colors.white)
write(" START ")
term.setCursorPos(1,1)
while true do local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
if XY == "1,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "2,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "3,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "4,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "5,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "6,18" and button == 1 then
term.clear()
shell.run("programs")
end
if XY == "7,18" and button == 1 then
term.clear()
shell.run("programs")
end
end
(http://pastebin.com/W3d4gt2r)
Edited by Asbetha, 06 February 2014 - 01:53 PM.











