Posted 22 April 2014 - 02:34 PM
Okay i want to when i click Blank_Explorer it opens a file called BlankEXP
when i click shutdown i want it to shutdown and when i click reboot for it to reboot.
To make it just edit the code from the spoiler and give me your code in my original code
About the section i am basically asking pros for code
Code:
EDIT2:I tried doing the mouse events tutorial and used this command
the tutorial is here btw http://babycodderblog.wordpress.com/2013/04/12/computercraft-using-computer-clicks-and-adv-monitor-touches-as-inputs/
event, button, x, y = os.pullEvent ("mouse_click)
if button == 1 and x == 27 and y == 1 then
sleep (1)
os.shutdown()
end
Nothing happens when i use that code even if i wait 100 seconds
however if i replace x == 27 with x == 1 then it works properly by clicking the corner
when i click shutdown i want it to shutdown and when i click reboot for it to reboot.
To make it just edit the code from the spoiler and give me your code in my original code
About the section i am basically asking pros for code
Code:
term.setBackgroundColor (colors.white)
term.setTextColor (colors.black)
term.clear()
term.setCursorPos (1,1)
image = paintutils.loadImage ("/LocalDrive/BlankOS/System/Images/Dock")
paintutils.drawImage (image, 1, 1)
term.setCursorPos (1,1)
print ("BlankOS")
term.setCursorPos (12,1)
print ("Blank_Explorer")
term.setCursorPos (27,1)
print ("Shutdown")
term.setCursorPos (36,1)
print ("Reboot")
term.setCursorPos (44,1)
local time = os.time()
time = textutils.formatTime (time, false)
print (""..time)
term.setCursorPos (1,21) ---thing that hides the cursor,makes it under the whole screen thats white
EDIT2:I tried doing the mouse events tutorial and used this command
the tutorial is here btw http://babycodderblog.wordpress.com/2013/04/12/computercraft-using-computer-clicks-and-adv-monitor-touches-as-inputs/
event, button, x, y = os.pullEvent ("mouse_click)
if button == 1 and x == 27 and y == 1 then
sleep (1)
os.shutdown()
end
Nothing happens when i use that code even if i wait 100 seconds
however if i replace x == 27 with x == 1 then it works properly by clicking the corner
Edited on 22 April 2014 - 01:33 PM