Jump to content




[Lua] Startup program with arguments


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

#1 W00dyR

  • Members
  • 135 posts

Posted 19 December 2012 - 06:13 AM

Hey guys,

I have a program that I want to run on startup, but the input requires an argument.

My script right now is

shell.run("disk/program1")

The program that I want executed requires an argument behind the "program1", and if possible even more arguments. How do I make it so that this happens in the shell.run ?

Thanks ahead!

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 19 December 2012 - 06:40 AM

shell.run("path/to/program", "anArgument", "anotherArgument", "aThirdArgument", aVariableWhoseContentsAreBeingPassedAsAnArgumentIfItIsANumberOrAString)

#3 W00dyR

  • Members
  • 135 posts

Posted 19 December 2012 - 06:47 AM

View PostLyqyd, on 19 December 2012 - 06:40 AM, said:

shell.run("path/to/program", "anArgument", "anotherArgument", "aThirdArgument", aVariableWhoseContentsAreBeingPassedAsAnArgumentIfItIsANumberOrAString)

Thank you very much once again, so if it is a string or number no "s and if its a argument you use "s right?

#4 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 19 December 2012 - 06:56 AM

No, if it's a variable drop the "s, if it is a string use "s.

#5 ChunLing

  • Members
  • 2,027 posts

Posted 19 December 2012 - 12:56 PM

For a number you don't need the double quotes, but only if it is for sure used as a number and not as a string.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users