Advertisement
Guest User

Untitled

a guest
Feb 7th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. dofile (getWorkingFolder() .. "\\scripts\\quik_table_wrapper.lua")
  2. dofile (getWorkingFolder() .. "\\scripts\\ntime.lua")
  3.  
  4. stopped = false
  5.  
  6.  
  7. function format1(data)
  8. return string.format("0x%08X", data)
  9. end
  10.  
  11. function format2(data)
  12. return string.format("%06d", data)
  13. end
  14.  
  15. function OnStop(s)
  16. stopped = true
  17. end
  18.  
  19.  
  20. function main()
  21. -- поворачивающиеся «палочки» в заголовке таблицы
  22. local palochki = {"-","\\", "|", "/"}
  23. local row
  24. -- создать экземпляр QTable
  25. t = QTable.new()
  26. if not t then
  27. message("error!", 3)
  28. return
  29. else
  30. message("table with id = " ..t.t_id .. " created", 1)
  31. end
  32.  
  33. t:AddColumn("time", QTABLE_STRING_TYPE, 20)
  34. --t:AddColumn("time", QTABLE_TIME_TYPE, 20)
  35. t:AddColumn("ai", QTABLE_STRING_TYPE, 20)
  36. t:AddColumn("aj", QTABLE_STRING_TYPE, 20)
  37. t:AddColumn("ak", QTABLE_STRING_TYPE, 20)
  38. t:AddColumn("al", QTABLE_STRING_TYPE, 20)
  39.  
  40. t:SetCaption("mumu")
  41. t:Show()
  42. row = t:AddLine()
  43. row = t:AddLine()
  44. if SetCell(t.t_id, row, 0, "time") == true  then
  45.     message("1")
  46. else
  47.     message("2")
  48. end
  49. if t:SetValue(row,"ai","ai") == true then
  50.     message("3")
  51. else
  52.     message("4")
  53. end
  54. stopped = true
  55. sleep(100)
  56. --------------
  57. message("ed")
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement