This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
makeme's profile picture

leaving a function not working on monitor_touch

Started by makeme, 08 March 2014 - 02:15 AM
makeme #1
Posted 08 March 2014 - 03:15 AM
This code isn't working I cant see why

its part of this and this
It prints fine but doesnt run the os.shell bit

while true do
  event, side, xPos, yPos = os.pullEvent("monitor_touch")
  print(event .. " => Side: " .. tostring(side) .. ", " ..
    "X: " .. tostring(xPos) .. ", " ..
    "Y: " .. tostring(yPos))
  if yPos == 13 and xPos >= 10 and xPos <= 15 then
    os.shell("TankMon") -- end the function
  end
end
end
sci4me #2
Posted 08 March 2014 - 03:31 AM
shell.run not os.shell?
or os.run… but thats a little bit different.. but anyway…


shell.run("TankMon")
should do what you want
makeme #3
Posted 08 March 2014 - 03:36 AM
shell.run not os.shell?
or os.run… but thats a little bit different.. but anyway…


shell.run("TankMon")
should do what you want

ffs i did that last time :/ thanks serves me right for trying to program late at night :P/>
makeme #4
Posted 08 March 2014 - 03:42 AM
shell.run not os.shell?
or os.run… but thats a little bit different.. but anyway…


shell.run("TankMon")
should do what you want

ffs i did that last time :/ thanks serves me right for trying to program late at night :P/>