Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [If,( [MemGetSize,pluginInit] = 0)
- ,//cmds
- [MVarDef,pluginInit,10,0]
- //define default values
- [MVarSet,pluginInit,0,0] //Switth set 0
- [MVarSet,pluginInit,1,0] //Switch set 1
- [MVarSet,pluginInit,2,0] //Switch set 2
- ,//else
- ]
- [ISubPalette, "ZPlugin:Test",0]
- [ISwitch, "ZPlugin:Test:Sw A"
- ,//button State
- 1
- //[MVarGet, pluginInit, 0]
- ,//popup tooltip
- "tooltip 1"
- ,//grouped commands when pressed
- [MVarSet, pluginInit,0,1]
- [IUnPress, "Zplugin:Test:Sw B"]
- [IUnPress, "Zplugin:Test:Sw C"]
- [IUnPress, "Zplugin:Test:Sw D"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,0,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "ZPlugin:Test:Sw A"]
- [ISwitch, "ZPlugin:Test:Sw B"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 2"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,0,2]
- [IUnPress, "Zplugin:Test:Sw A"]
- [IUnPress, "Zplugin:Test:Sw C"]
- [IUnPress, "Zplugin:Test:Sw D"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,0,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw B"]
- [ISwitch, "ZPlugin:Test:Sw C"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 3"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,0,3]
- [IUnPress, "Zplugin:Test:Sw A"]
- [IUnPress, "Zplugin:Test:Sw B"]
- [IUnPress, "Zplugin:Test:Sw D"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,0,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw C"]
- [ISwitch, "ZPlugin:Test:Sw D"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 4"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,0,4]
- [IUnPress, "Zplugin:Test:Sw A"]
- [IUnPress, "Zplugin:Test:Sw B"]
- [IUnPress, "Zplugin:Test:Sw C"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,0,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw D"]
- [ISwitch, "ZPlugin:Test:Sw A2"
- ,//button State
- 1
- ,//popup tooltip
- "tooltip 5"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,1,1]
- [IUnPress, "Zplugin:Test:Sw B2"]
- [IUnPress, "Zplugin:Test:Sw C2"]
- [IUnPress, "Zplugin:Test:Sw D2"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,1,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw A2"]
- [ISwitch, "ZPlugin:Test:Sw B2"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 6"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,1,2]
- [IUnPress, "Zplugin:Test:Sw A2"]
- [IUnPress, "Zplugin:Test:Sw C2"]
- [IUnPress, "Zplugin:Test:Sw D2"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,1,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw B2"]
- [ISwitch, "ZPlugin:Test:Sw C2"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 7"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,1,3]
- [IUnPress, "Zplugin:Test:Sw A2"]
- [IUnPress, "Zplugin:Test:Sw B2"]
- [IUnPress, "Zplugin:Test:Sw D2"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,1,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw C2"]
- [ISwitch, "ZPlugin:Test:Sw D2"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 8"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,1,4]
- [IUnPress, "Zplugin:Test:Sw A2"]
- [IUnPress, "Zplugin:Test:Sw B2"]
- [IUnPress, "Zplugin:Test:Sw C2"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,1,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw D2"]
- [ISwitch, "ZPlugin:Test:Sw A3"
- ,//button State
- 1
- ,//popup tooltip
- "tooltip 1"
- ,//grouped commands when pressed
- [MVarSet, pluginInit,2,1]
- [IUnPress, "Zplugin:Test:Sw B"]
- [IUnPress, "Zplugin:Test:Sw C"]
- [IUnPress, "Zplugin:Test:Sw D"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,2,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "ZPlugin:Test:Sw A3"]
- [ISwitch, "ZPlugin:Test:Sw B3"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 2"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,2,2]
- [IUnPress, "Zplugin:Test:Sw A3"]
- [IUnPress, "Zplugin:Test:Sw C3"]
- [IUnPress, "Zplugin:Test:Sw D3"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,2,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw B3"]
- [ISwitch, "ZPlugin:Test:Sw C3"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 3"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,2,3]
- [IUnPress, "Zplugin:Test:Sw A3"]
- [IUnPress, "Zplugin:Test:Sw B3"]
- [IUnPress, "Zplugin:Test:Sw D3"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,2,0]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw C3"]
- [ISwitch, "ZPlugin:Test:Sw D3"
- ,//button State
- 0
- ,//popup tooltip
- "tooltip 4"
- ,//grouped commands when pressed
- [MVarSet,pluginInit,2,4]
- [IUnPress, "Zplugin:Test:Sw A3"]
- [IUnPress, "Zplugin:Test:Sw B3"]
- [IUnPress, "Zplugin:Test:Sw C3"]
- , //grouped command when unpressed
- [MVarSet,pluginInit,2,4]
- , //initially disable
- 1
- ,0.25
- ]
- [IEnable, "Zplugin:Test:Sw D3"]
- [Sleep
- , // Sleep amount in seconds
- 0.001
- , // Commands group to execute when awaken
- [If, ([MemGetSize, pluginInit]==0),
- [If, ([MVarGet, pluginInit, 0]=1), [IPress, "ZPlugin:Test:Sw A"]] // 0 = disable, 1 = Switch A is enable
- [If, ([MVarGet, pluginInit, 0]=2), [IPress, "ZPlugin:Test:Sw B"]] // 2 Switch B is enable
- [If, ([MVarGet, pluginInit, 0]=3), [IPress, "ZPlugin:Test:Sw C"]] // 3 Switch C is enable
- [If, ([MVarGet, pluginInit, 0]=4), [IPress, "ZPlugin:Test:Sw D"]] // 4 Switch D is enable
- [If, ([MVarGet, pluginInit, 1]=1), [IPress, "ZPlugin:Test:Sw A2"]] // 0 = disable, 1 = Switch A2 is enable
- [If, ([MVarGet, pluginInit, 1]=2), [IPress, "ZPlugin:Test:Sw B2"]] // 2 Switch B2 is enable
- [If, ([MVarGet, pluginInit, 1]=3), [IPress, "ZPlugin:Test:Sw C2"]] // 3 Switch C2 is enable
- [If, ([MVarGet, pluginInit, 1]=4), [IPress, "ZPlugin:Test:Sw D2"]] // 4 Switch D2 is enable
- [If, ([MVarGet, pluginInit, 2]=1), [IPress, "ZPlugin:Test:Sw A3"]] // 0 = disable, 1 = Switch A is enable
- [If, ([MVarGet, pluginInit, 2]=2), [IPress, "ZPlugin:Test:Sw B3"]] // 2 Switch B is enable
- [If, ([MVarGet, pluginInit, 2]=3), [IPress, "ZPlugin:Test:Sw C3"]] // 3 Switch C is enable
- [If, ([MVarGet, pluginInit, 2]=4), [IPress, "ZPlugin:Test:Sw D3"]] // 4 Switch D is enable
- ,//else
- [MVarSet,pluginInit,0,0]
- [MVarSet,pluginInit,1,0]
- [MVarSet,pluginInit,2,0]
- [IPress, ptr_ID]
- [IUpdate, 1, 1]
- ]
- , // Optional event (default:1) (256:Startup 512:Shut down 1024:InterfaceItem pressed/unpressed)
- 256
- , // Optional output variable which will contain the event code that has awaken the ZScript
- result
- , // Optional output variable which will contain the ID of the window pointed by the mouse
- ptr_ID
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement