Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1.  
  2. [If,( [MemGetSize,pluginInit] = 0)
  3. ,//cmds
  4. [MVarDef,pluginInit,10,0]
  5. //define default values
  6. [MVarSet,pluginInit,0,0] //Switth set 0
  7. [MVarSet,pluginInit,1,0] //Switch set 1
  8. [MVarSet,pluginInit,2,0] //Switch set 2
  9. ,//else
  10.  
  11. ]
  12.  
  13. [ISubPalette, "ZPlugin:Test",0]
  14.  
  15. [ISwitch, "ZPlugin:Test:Sw A"
  16. ,//button State
  17. 1
  18. //[MVarGet, pluginInit, 0]
  19. ,//popup tooltip
  20. "tooltip 1"
  21. ,//grouped commands when pressed
  22. [MVarSet, pluginInit,0,1]
  23. [IUnPress, "Zplugin:Test:Sw B"]
  24. [IUnPress, "Zplugin:Test:Sw C"]
  25. [IUnPress, "Zplugin:Test:Sw D"]
  26. , //grouped command when unpressed
  27. [MVarSet,pluginInit,0,0]
  28. , //initially disable
  29. 1
  30. ,0.25
  31. ]
  32.  
  33. [IEnable, "ZPlugin:Test:Sw A"]
  34.  
  35. [ISwitch, "ZPlugin:Test:Sw B"
  36. ,//button State
  37. 0
  38. ,//popup tooltip
  39. "tooltip 2"
  40. ,//grouped commands when pressed
  41. [MVarSet,pluginInit,0,2]
  42. [IUnPress, "Zplugin:Test:Sw A"]
  43. [IUnPress, "Zplugin:Test:Sw C"]
  44. [IUnPress, "Zplugin:Test:Sw D"]
  45. , //grouped command when unpressed
  46. [MVarSet,pluginInit,0,0]
  47. , //initially disable
  48. 1
  49. ,0.25
  50. ]
  51. [IEnable, "Zplugin:Test:Sw B"]
  52.  
  53. [ISwitch, "ZPlugin:Test:Sw C"
  54. ,//button State
  55. 0
  56. ,//popup tooltip
  57. "tooltip 3"
  58. ,//grouped commands when pressed
  59. [MVarSet,pluginInit,0,3]
  60. [IUnPress, "Zplugin:Test:Sw A"]
  61. [IUnPress, "Zplugin:Test:Sw B"]
  62. [IUnPress, "Zplugin:Test:Sw D"]
  63. , //grouped command when unpressed
  64. [MVarSet,pluginInit,0,0]
  65. , //initially disable
  66. 1
  67. ,0.25
  68. ]
  69. [IEnable, "Zplugin:Test:Sw C"]
  70.  
  71. [ISwitch, "ZPlugin:Test:Sw D"
  72. ,//button State
  73. 0
  74. ,//popup tooltip
  75. "tooltip 4"
  76. ,//grouped commands when pressed
  77. [MVarSet,pluginInit,0,4]
  78. [IUnPress, "Zplugin:Test:Sw A"]
  79. [IUnPress, "Zplugin:Test:Sw B"]
  80. [IUnPress, "Zplugin:Test:Sw C"]
  81. , //grouped command when unpressed
  82. [MVarSet,pluginInit,0,0]
  83. , //initially disable
  84. 1
  85. ,0.25
  86. ]
  87. [IEnable, "Zplugin:Test:Sw D"]
  88.  
  89.  
  90. [ISwitch, "ZPlugin:Test:Sw A2"
  91. ,//button State
  92. 1
  93. ,//popup tooltip
  94. "tooltip 5"
  95. ,//grouped commands when pressed
  96. [MVarSet,pluginInit,1,1]
  97. [IUnPress, "Zplugin:Test:Sw B2"]
  98. [IUnPress, "Zplugin:Test:Sw C2"]
  99. [IUnPress, "Zplugin:Test:Sw D2"]
  100. , //grouped command when unpressed
  101. [MVarSet,pluginInit,1,0]
  102. , //initially disable
  103. 1
  104. ,0.25
  105. ]
  106. [IEnable, "Zplugin:Test:Sw A2"]
  107. [ISwitch, "ZPlugin:Test:Sw B2"
  108. ,//button State
  109. 0
  110. ,//popup tooltip
  111. "tooltip 6"
  112. ,//grouped commands when pressed
  113. [MVarSet,pluginInit,1,2]
  114. [IUnPress, "Zplugin:Test:Sw A2"]
  115. [IUnPress, "Zplugin:Test:Sw C2"]
  116. [IUnPress, "Zplugin:Test:Sw D2"]
  117. , //grouped command when unpressed
  118.  
  119. [MVarSet,pluginInit,1,0]
  120. , //initially disable
  121. 1
  122. ,0.25
  123. ]
  124. [IEnable, "Zplugin:Test:Sw B2"]
  125.  
  126. [ISwitch, "ZPlugin:Test:Sw C2"
  127. ,//button State
  128. 0
  129. ,//popup tooltip
  130. "tooltip 7"
  131. ,//grouped commands when pressed
  132. [MVarSet,pluginInit,1,3]
  133. [IUnPress, "Zplugin:Test:Sw A2"]
  134. [IUnPress, "Zplugin:Test:Sw B2"]
  135. [IUnPress, "Zplugin:Test:Sw D2"]
  136. , //grouped command when unpressed
  137. [MVarSet,pluginInit,1,0]
  138. , //initially disable
  139. 1
  140. ,0.25
  141. ]
  142. [IEnable, "Zplugin:Test:Sw C2"]
  143.  
  144. [ISwitch, "ZPlugin:Test:Sw D2"
  145. ,//button State
  146. 0
  147. ,//popup tooltip
  148. "tooltip 8"
  149. ,//grouped commands when pressed
  150. [MVarSet,pluginInit,1,4]
  151. [IUnPress, "Zplugin:Test:Sw A2"]
  152. [IUnPress, "Zplugin:Test:Sw B2"]
  153. [IUnPress, "Zplugin:Test:Sw C2"]
  154. , //grouped command when unpressed
  155. [MVarSet,pluginInit,1,0]
  156. , //initially disable
  157. 1
  158. ,0.25
  159. ]
  160. [IEnable, "Zplugin:Test:Sw D2"]
  161.  
  162. [ISwitch, "ZPlugin:Test:Sw A3"
  163. ,//button State
  164. 1
  165. ,//popup tooltip
  166. "tooltip 1"
  167. ,//grouped commands when pressed
  168. [MVarSet, pluginInit,2,1]
  169. [IUnPress, "Zplugin:Test:Sw B"]
  170. [IUnPress, "Zplugin:Test:Sw C"]
  171. [IUnPress, "Zplugin:Test:Sw D"]
  172. , //grouped command when unpressed
  173. [MVarSet,pluginInit,2,0]
  174. , //initially disable
  175. 1
  176. ,0.25
  177. ]
  178.  
  179. [IEnable, "ZPlugin:Test:Sw A3"]
  180.  
  181. [ISwitch, "ZPlugin:Test:Sw B3"
  182. ,//button State
  183. 0
  184. ,//popup tooltip
  185. "tooltip 2"
  186. ,//grouped commands when pressed
  187. [MVarSet,pluginInit,2,2]
  188. [IUnPress, "Zplugin:Test:Sw A3"]
  189. [IUnPress, "Zplugin:Test:Sw C3"]
  190. [IUnPress, "Zplugin:Test:Sw D3"]
  191. , //grouped command when unpressed
  192. [MVarSet,pluginInit,2,0]
  193. , //initially disable
  194. 1
  195. ,0.25
  196. ]
  197. [IEnable, "Zplugin:Test:Sw B3"]
  198.  
  199. [ISwitch, "ZPlugin:Test:Sw C3"
  200. ,//button State
  201. 0
  202. ,//popup tooltip
  203. "tooltip 3"
  204. ,//grouped commands when pressed
  205. [MVarSet,pluginInit,2,3]
  206. [IUnPress, "Zplugin:Test:Sw A3"]
  207. [IUnPress, "Zplugin:Test:Sw B3"]
  208. [IUnPress, "Zplugin:Test:Sw D3"]
  209. , //grouped command when unpressed
  210. [MVarSet,pluginInit,2,0]
  211. , //initially disable
  212. 1
  213. ,0.25
  214. ]
  215. [IEnable, "Zplugin:Test:Sw C3"]
  216.  
  217. [ISwitch, "ZPlugin:Test:Sw D3"
  218. ,//button State
  219. 0
  220. ,//popup tooltip
  221. "tooltip 4"
  222. ,//grouped commands when pressed
  223. [MVarSet,pluginInit,2,4]
  224. [IUnPress, "Zplugin:Test:Sw A3"]
  225. [IUnPress, "Zplugin:Test:Sw B3"]
  226. [IUnPress, "Zplugin:Test:Sw C3"]
  227. , //grouped command when unpressed
  228. [MVarSet,pluginInit,2,4]
  229. , //initially disable
  230. 1
  231. ,0.25
  232. ]
  233. [IEnable, "Zplugin:Test:Sw D3"]
  234.  
  235.  
  236. [Sleep
  237. , // Sleep amount in seconds
  238. 0.001
  239. , // Commands group to execute when awaken
  240. [If, ([MemGetSize, pluginInit]==0),
  241.  
  242. [If, ([MVarGet, pluginInit, 0]=1), [IPress, "ZPlugin:Test:Sw A"]] // 0 = disable, 1 = Switch A is enable
  243. [If, ([MVarGet, pluginInit, 0]=2), [IPress, "ZPlugin:Test:Sw B"]] // 2 Switch B is enable
  244. [If, ([MVarGet, pluginInit, 0]=3), [IPress, "ZPlugin:Test:Sw C"]] // 3 Switch C is enable
  245. [If, ([MVarGet, pluginInit, 0]=4), [IPress, "ZPlugin:Test:Sw D"]] // 4 Switch D is enable
  246.  
  247.  
  248. [If, ([MVarGet, pluginInit, 1]=1), [IPress, "ZPlugin:Test:Sw A2"]] // 0 = disable, 1 = Switch A2 is enable
  249. [If, ([MVarGet, pluginInit, 1]=2), [IPress, "ZPlugin:Test:Sw B2"]] // 2 Switch B2 is enable
  250. [If, ([MVarGet, pluginInit, 1]=3), [IPress, "ZPlugin:Test:Sw C2"]] // 3 Switch C2 is enable
  251. [If, ([MVarGet, pluginInit, 1]=4), [IPress, "ZPlugin:Test:Sw D2"]] // 4 Switch D2 is enable
  252.  
  253. [If, ([MVarGet, pluginInit, 2]=1), [IPress, "ZPlugin:Test:Sw A3"]] // 0 = disable, 1 = Switch A is enable
  254. [If, ([MVarGet, pluginInit, 2]=2), [IPress, "ZPlugin:Test:Sw B3"]] // 2 Switch B is enable
  255. [If, ([MVarGet, pluginInit, 2]=3), [IPress, "ZPlugin:Test:Sw C3"]] // 3 Switch C is enable
  256. [If, ([MVarGet, pluginInit, 2]=4), [IPress, "ZPlugin:Test:Sw D3"]] // 4 Switch D is enable
  257.  
  258. ,//else
  259. [MVarSet,pluginInit,0,0]
  260. [MVarSet,pluginInit,1,0]
  261. [MVarSet,pluginInit,2,0]
  262.  
  263.  
  264. [IPress, ptr_ID]
  265. [IUpdate, 1, 1]
  266. ]
  267.  
  268. , // Optional event (default:1) (256:Startup 512:Shut down 1024:InterfaceItem pressed/unpressed)
  269. 256
  270. , // Optional output variable which will contain the event code that has awaken the ZScript
  271. result
  272. , // Optional output variable which will contain the ID of the window pointed by the mouse
  273. ptr_ID
  274.  
  275. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement