I'm parsing a data from xml file, where I have some notification info. I have set it up so it displays notifications when there is <count>number bigger than zero</count>, if it is <count>0</count> it hides the notification.
I would like to be able to dismiss these notifications by simply clicking on the number displayed, and for that I would need to write to xml file following data: <count>0</count>
How would I go about that?
Code: Select all
[MeasureGetCalls]
Measure=Plugin
Plugin=Plugins\WebParser
UpdateRate=10
URL=file://C:\ring.xml
RegExp="(?siU)<count>(.*)</count>"
[NumberOfNewCalls]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGetCalls]
StringIndex=1
IfEqualValue=0
IfEqualAction=[!HideMeter CallBubble][!HideMeter CallCountTXT][!Redraw]
IfAboveValue=0
IfAboveAction=[!ShowMeter CallBubble][!ShowMeter CallCountTXT][!Redraw]
DynamicVariables=1
[MeasureScript]
Measure=Script
ScriptFile=#@#write.lua
; CALL
[CallIcon]
Meter=Image
ImageName=icons/call.png
x=-45r
y=0r
ImageAlpha=#IconAlpha#
ImageTint=#IconColor#
[CallBubble]
Meter=Image
ImageName=icons/small_circle.png
x=9r
y=-2r
ImageTint=#NotificationColor#
Hidden=1
LeftMouseUpAction=[!HideMeter CallBubble][!HideMeter CallCountTXT][!CommandMeasure MeasureScript Initialize()][!Redraw]
[CallCountTXT]
MeasureName=NumberOfNewCalls
Meter=STRING
X=8r
Y=2r
StringAlign=Center
FontColor=#NotificationTXTColor#
FontSize=7
FontFace=Arial
AntiAlias=0
StringEffect=Shadow
Hidden=1
LeftMouseUpAction=[!HideMeter CallBubble][!HideMeter CallCountTXT][!CommandMeasure MeasureScript Initialize()][!Redraw]
Code: Select all
function Initialize()
local file=io.open(SKIN:MakePathAbsolute('\ring.xml'), 'w')
if file then
io.output(file)
file:write('<count>0</count>')
else
print('Error: Invalid File Path.')
end
io.close(file)
End
thnks