- Messages
- 1,084
- Country

I need to have a gauge that is a lamp test switch. I found this code and modified it by removing ACEs stuff at the top which did not look like XML and I didn't understand it. So with my xml code manual I created this gauge. The XML Validator online says no errors and the switch is visible on the panel but it does not work no click movement. Somebody help me with this please?
[ICODE
<Gauge Name="Lamp_Test_Switch" Version="1.0">
<Element>
<Select>
<Value>(G:Var1)</Value>
<Case Value="0">
<Image Name="switch_off.bmp" ImageSizes="25,25"/>
</Case>
<Case Value="1">.
<Image Name="switch_on.bmp" ImageSizes="25,25"/>
</Case>
</Select>
</Element>
<MouseArea id="MouseArea">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>25,39</Size>
<MouseArea id="Lamp Test Switch">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>25,39</Size>
<CursorType>Hand</CursorType>
<MouseClick id="MouseClick">
<Script>
(M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:Lamp Test,bool) }
(M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:Lamp Test,bool) }
</Script>
<ClickType>LeftSingle+LeftRelease</ClickType>
</MouseClick>
<Tooltip id="Tooltip">
<DefaultId></DefaultId>
</Tooltip>
</MouseArea>
</Gauge>
][/ICODE]
The XML Code expert is probably going to look at this and just shake their head. I know just enough to get myself all confused I would appreciate this being fixed so it works. Thank you.
[ICODE
<Gauge Name="Lamp_Test_Switch" Version="1.0">
<Element>
<Select>
<Value>(G:Var1)</Value>
<Case Value="0">
<Image Name="switch_off.bmp" ImageSizes="25,25"/>
</Case>
<Case Value="1">.
<Image Name="switch_on.bmp" ImageSizes="25,25"/>
</Case>
</Select>
</Element>
<MouseArea id="MouseArea">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>25,39</Size>
<MouseArea id="Lamp Test Switch">
<FloatPosition>0.000,0.000</FloatPosition>
<Size>25,39</Size>
<CursorType>Hand</CursorType>
<MouseClick id="MouseClick">
<Script>
(M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:Lamp Test,bool) }
(M:Event) 'LeftRelease' scmp 0 == if{ 0 (>L:Lamp Test,bool) }
</Script>
<ClickType>LeftSingle+LeftRelease</ClickType>
</MouseClick>
<Tooltip id="Tooltip">
<DefaultId></DefaultId>
</Tooltip>
</MouseArea>
</Gauge>
][/ICODE]
The XML Code expert is probably going to look at this and just shake their head. I know just enough to get myself all confused I would appreciate this being fixed so it works. Thank you.


