Advertisement
Guest User

Untitled

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