Jump to content




[Lua] [Question] Adding actions to Liraal's Menu


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

#1 Brodur

  • Members
  • 21 posts
  • LocationCanada, eh?

Posted 29 July 2012 - 06:46 PM

So, I made lirral's menu function on a computer and had another program use it, but now I'm wondering, how do I actually make the menu run things? here is what I tried, but if it worked I wouldn't be posting here :ph34r:/>

local options={
"Launch VaulTec",
"Continue to CraftOS 1.3"
}
local n=CUI(options)
print(n)
if n=1 then
sleep(0.1)
shell.run "vault"
else
shell.run "shell"
end

So, I tried adding an if else to see if that would work but no cigar, any suggestions?

- Here is the link to Irral's topic: http://www.computerc...gh-menu-making/

#2 sjele

  • Members
  • 334 posts
  • LocationSomewhere on the planet called earth

Posted 29 July 2012 - 06:52 PM

shell.run is used like this :
shell.run ("programname")  -- Change programname to the porgram name


#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 29 July 2012 - 09:34 PM

You did include the CUI function in your code someplace, correct? If it can't find the function, it can't call it.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users