Jump to content




Help


  • You cannot reply to this topic
4 replies to this topic

#1 Leon669

  • Members
  • 57 posts
  • LocationGermany

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?

#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, 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


#3 Dragon53535

  • Members
  • 973 posts
  • LocationIn 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 by Dragon53535, 22 February 2015 - 01:32 AM.


#4 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 22 February 2015 - 01:34 AM

View PostDragon53535, on 22 February 2015 - 01:31 AM, said:

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)


#5 Leon669

  • Members
  • 57 posts
  • LocationGermany

Posted 23 February 2015 - 04:41 PM

Have found the answer alone. But thanks :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users