Problem Scenario:
In my work I have a Rainmeter skin, where there is a Facebook RSS Feed meter (exact the same as in Gnometer) that shows the 2 latest notifications for my account. I'am connected to the Internet via Proxy. Offcourse proxy does not allow us to connect to Facebook, so the skin shows nothing (by direct connection at home shows everything OK). I would really like the skin to show a message "Not available" in case it cannot retrieve the RSS Feed (or there is no connection at all).
How can it be done?
I get the general idea, most probably it can be achieved by something similar to this:
(Here the skins shows N/A where there is no WiFi connection)
Code: Select all
[mStrength]
Measure=Plugin
Plugin=WifiStatus.dll
WifiInfoType=QUALITY
WifiIntfID=0
IfEqualValue=0
IfEqualAction=!execute [!RainmeterSetVariable Text "N/A"]
IfAboveValue=0
IfAboveAction=!execute [!RainmeterSetVariable Text "%1"]
UpdateDivider=5
The FB ini :
Code: Select all
[Variables]
feeds.facebook=http://MY FB RSS URL
GET=(?(?=.*<item>).*<item>.*<title>(.*)</.*<link>(.*)</)
SubstituteFeed="'":"'",""":"","&Quot;":"","&":"&","<br>":"","![CDATA[":"","]]":"","...":"","<":"",">":"","/PRE>":"","PRE>":"","<":"","'":"'","ä":"?"ö":"??–":"?,"'":"'"
SubstituteLink="&":"&","<![CDATA[":"","]]>":""
[mFacebook]
Measure=Plugin
Plugin=WebParser.dll
Url=#feeds.Facebook#
RegExp="(?siU)#GET##GET#"
UpdateRate=60
[mItem1]
Measure=Plugin
Plugin=WebParser.dll
Url=[mFacebook]
DecodeCharacterReference=1
StringIndex=1
Substitute=#SubstituteFeed#
[mLink1]
Measure=Plugin
Plugin=WebParser.dll
Url=[mFacebook]
StringIndex=2
;Substitute=#SubstituteLink#
[mItem2]
Measure=Plugin
Plugin=WebParser.dll
Url=[mFacebook]
DecodeCharacterReference=1
StringIndex=3
Substitute=#SubstituteFeed#
[mLink2]
Measure=Plugin
Plugin=WebParser.dll
Url=[mFacebook]
StringIndex=4
Substitute=#SubstituteLink#
; METERS ======================================
[meterSeperator3]
Meter=IMAGE
MeterStyle=styleSeperator
X=0
Y=12
W=180
H=3
[Subtitle]
Meter=STRING
x=5
Y=0
W=100
H=20
MeterStyle=styleLeftTextBold
AntiAlias=1
LeftMouseUpAction=!Execute [www.facebook.com]
RightMouseDownAction=!Execute [!RainmeterRefresh]
ToolTipText="Open www.facebook.com (right-click to refresh)"
MouseActionCursor=1
Text="Facebook:"
[Item1.>]
Meter=STRING
MeterStyle=styleLeftText
X=5
Y=20
Text=>
[Item1]
Meter=STRING
MeterStyle=styleLeftText
MeasureName=mItem1
;LeftMouseUpAction=!Execute ["[mLink1]"]
X=10
Y=20
W=165
H=20
FontColor=#FontColor#
AntiAlias=1
[Item2.>]
Meter=STRING
MeterStyle=styleLeftText
X=5
Y=40
Text=>
[Item2]
Meter=STRING
MeterStyle=styleLeftText
MeasureName=mItem2
;LeftMouseUpAction=!Execute ["[mLink2]"]
X=10
Y=40
W=165
H=20
FontColor=#FontColor#
AntiAlias=1