Logic Machine Forum
Script delete ? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Script delete ? (/showthread.php?tid=2585)



Script delete ? - epps - 16.04.2020

Hello everyone,

is it possible to delete a script by a script ?

like this ?
 
script.remove('Scriptname')

Kind regards and thank you for any help in advance


RE: Script delete ? - admin - 16.04.2020

There's no built-in function for this, but you can emulate a web request in your script (change 1 to your script ID):
Code:
require('json')
function json.data()
  return { id = 1 }
end
dofile('/lib/genohm-scada/web/scripting/delete.lua')