View difference between Paste ID: VHn7GwHm and DHykqkJG
SHOW: | | - or go back to the newest paste.
1
time = os.time()
2
rednet.open("back")
3
image = paintutils.loadImage("iphone")
4
paintutils.drawImage(image,1,1)
5
term.setCursorPos(5,8)
6
term.write("1")
7
term.setCursorPos(9,8)
8
term.write("2")
9
term.setCursorPos(6,4)
10
term.write(time.." heure")
11
term.setCursorPos(13,8)
12
term.write("3")
13
term.setCursorPos(5,11)
14
term.write("4")
15
term.setCursorPos(9,11)
16
term.write("5")
17
term.setCursorPos(13,11)
18
term.write("6")
19
term.setCursorPos(5,14)
20
term.write("7")
21
term.setCursorPos(9,14)
22
term.write("8")
23
term.setCursorPos(13,14)
24
term.write("9")
25
term.setCursorPos(8,17)
26
term.write("0")
27
28
29
30
while true do 
31
 event,button ,xpos,ypos = os.pullEvent("mouse_click")
32
 print("x pos ="..xpos)
33
 print("y pos ="..ypos)
34
  if ((xpos>3)and (xpos<7)) and ((ypos>7) and (ypos<10)) then
35
  code=1
36
 print(code)
37
  end
38-
        end
38+
  if ((xpos>7)and (xpos<11)) and ((ypos>7) and (ypos<10)) then
39
  code=2      
40
  end
41
  if ((xpos>11) and (xpos<15)) and ((ypos>7) and (ypos<10)) then 
42
  code=3
43
   end
44
  if ((xpos>3)and (xpos<7)) and ((ypos>10) and (ypos<13)) then
45
  code=4
46
  end 
47
  if ((xpos>7)and (xpos<11)) and ((ypos>10) and (ypos<13)) then
48
  code=5
49
  end 
50
   if ((xpos>11)and (xpos<15)) and ((ypos>10) and (ypos<13)) then
51
   code=6
52
   end 
53
    if ((xpos>3)and (xpos<7)) and ((ypos>13) and (ypos<16)) then  
54
   code=7
55
   end 
56
   if ((xpos>7)and (xpos<11)) and ((ypos>13) and (ypos<16)) then 
57
   code=8
58
   end 
59
   if ((xpos>11)and (xpos<15)) and ((ypos>13) and (ypos<16)) then 
60
   code=9
61
   end 
62
   if ((xpos>7)and (xpos<11)) and ((ypos>16) and (ypos<19)) then    
63
   code=0
64
   end
65
end