1
0

lua1.xml 1009 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <KLISH
  3. xmlns="http://clish.sourceforge.net/XMLSchema"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema http://clish.sourceforge.net/XMLSchema/clish.xsd">
  6. <PLUGIN name="klish"/>
  7. <ENTRY name="COMMAND" purpose="ptype">
  8. <ACTION sym="COMMAND"/>
  9. </ENTRY>
  10. <ENTRY name="INT" purpose="ptype">
  11. <ACTION sym="INT"/>
  12. </ENTRY>
  13. <ENTRY name="main" mode="switch" container="true">
  14. <ENTRY name="cmd" help="Clear settings" mode="sequence">
  15. <ENTRY name="COMMAND" purpose="ptype" ref="/COMMAND"/>
  16. <ENTRY name="int_val" help="Integer" mode="sequence" min="1" max="2">
  17. <ENTRY name="INT" purpose="ptype" ref="/INT"/>
  18. </ENTRY>
  19. <ACTION sym="lua">
  20. local pars = klish.par()
  21. for k, v in ipairs(pars) do
  22. print(v..":", pars[v][1])
  23. end
  24. print("int_val = ", klish.par('int_val')[1])
  25. </ACTION>
  26. </ENTRY>
  27. </ENTRY>
  28. <PLUGIN name="lua"/>
  29. </KLISH>