56 posts
Location
Germany
Posted 21 February 2015 - 07:27 PM
term.setCursorPos(1,7)
write("Enter name of the Background you want to create:")
name = io.read()
shell.run"paint (name)"
how can I say the programm to open a new paint file with the previously surrounded name?
1140 posts
Location
Kaunas, Lithuania
Posted 21 February 2015 - 07:41 PM
Use a string concat operator ( .. ):
local name = "John"
local surname = "Smith"
local fullName = name .. " " .. surname
print( fullName ) --> John Smith
1080 posts
Location
In the Matrix
Posted 22 February 2015 - 01:31 AM
To translate that for your program. You'd want
shell.run("paint "..name) --#You need the space after paint
Edited on 22 February 2015 - 12:32 AM
957 posts
Location
Web Development
Posted 22 February 2015 - 01:34 AM
To translate that for your program. You'd want
shell.run("paint "..name) --#You need the space after paint
Or pass each as a separate argument:
shell.run("paint",name)
56 posts
Location
Germany
Posted 23 February 2015 - 04:41 PM
Have found the answer alone. But thanks :D/>