Difference between revisions of "Shell Commands/LuaX"

From MorphOS Library

< Shell Commands

Line 11: Line 11:
 
  Ram Disk:> LuaX S:MultiMeedio.lua NEXT
 
  Ram Disk:> LuaX S:MultiMeedio.lua NEXT
 
=> Executes the MultiMeedio.lua script found in S: and passes the "NEXT" argument to the script.
 
=> Executes the MultiMeedio.lua script found in S: and passes the "NEXT" argument to the script.
 +
 +
 +
Note:
 +
MorphOS comes with the latest version of Lua installed in the SYS:MorphOS/ directory (MOSSYS:), but if you have installed an older Lua to SYS: earlier, you should remove the old one. You can check the location with the [[Shell_Commands/Which | Which]] command and the result should look like this:
 +
<nowiki>
 +
Ram Disk:> Which LuaX
 +
System:MorphOS/C/LuaX
 +
</nowiki>

Revision as of 16:57, 11 December 2015

LuaX - Interprets a Lua script

FILE, INTERACTIVE=-I/S, ARGS/F

FILE        - A Lua script file to execute
INTERACTIVE - Gives an interactive prompt to converse with the interpreter
ARGS        - Arguments for the script

Example:

Ram Disk:> LuaX S:MultiMeedio.lua NEXT

=> Executes the MultiMeedio.lua script found in S: and passes the "NEXT" argument to the script.


Note: MorphOS comes with the latest version of Lua installed in the SYS:MorphOS/ directory (MOSSYS:), but if you have installed an older Lua to SYS: earlier, you should remove the old one. You can check the location with the Which command and the result should look like this:

Ram Disk:> Which LuaX
System:MorphOS/C/LuaX