21.03.2018, 11:11
Code:
<?
require('apps')
name = getvar('name')
scriptdata = getvar('script')
if name and scriptdata then
item = script.get(name)
if item then
item.script = scriptdata
db:update('scripting', { script = scriptdata }, { id = item.id })
-- save script data to file
script.save(item, true)
-- reload script/group monitor
script.reloadsingle(item)
print('update ok')
else
print('script not found')
end
else
print('invalid arguments')
end
Here it is