comparison Resources/Toolbox.lua @ 1065:921532f67770

Lua scripts can invoke system commands, with CallSystem()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Jul 2014 16:59:33 +0200
parents 160dfe770618
children d710ea64f0fd
comparison
equal deleted inserted replaced
1064:cd20e2568fc2 1065:921532f67770
91 }) 91 })
92 return '' -- Chain with another operation 92 return '' -- Chain with another operation
93 end 93 end
94 94
95 95
96 function CallSystem(instanceId, command, args)
97 if instanceId == nil then
98 error('Cannot modify a nonexistent instance')
99 end
100
101 table.insert(_job, {
102 Operation = 'call-system',
103 Instance = instanceId,
104 Command = command,
105 Arguments = args
106 })
107
108 return instanceId
109 end
110
96 111
97 print('Lua toolbox installed') 112 print('Lua toolbox installed')