60 posts
Location
The Nethelands
Posted 11 November 2012 - 06:32 AM
This is the code
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
shell.run("/programs/paint/paint, input")
The error: No such program
/programs/paint/paint exist
1688 posts
Location
'MURICA
Posted 11 November 2012 - 07:06 AM
Two things. The program is actually in /rom/programs/color/paint, and that you haven't separated your arguments for shell.run. Also, you can just run 'paint' without having to type it's full, actual path. The last line should go something like this:
shell.run("paint", "input")
8543 posts
Posted 11 November 2012 - 07:19 AM
Is it? I seem to recall it being in rom/programs/color/paint for some reason.
1688 posts
Location
'MURICA
Posted 11 November 2012 - 07:23 AM
Is it? I seem to recall it being in rom/programs/color/paint for some reason.
Yep, it's /color/paint, my mistake.
60 posts
Location
The Nethelands
Posted 12 November 2012 - 02:42 AM
I have now but i get this error: paintstart:7: attempt to index ? (a nil value)
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
shell.run("paint", "input")
1688 posts
Location
'MURICA
Posted 12 November 2012 - 04:22 AM
I'm not sure if this is it, but you should probably remove the quotes around "input" on the last line.
60 posts
Location
The Nethelands
Posted 12 November 2012 - 05:07 AM
If I have this I only see 7 when i give a input.
local paintgui = paintutils.loadImage("/gui/paint")
paintutils.drawImage(paintgui, 0, 0)
term.setCursorPos(24,7)
print("Path")
term.setCursorPos(1,8)
input = io.read()
print("7")
shell.run("paint", input)
print("9")