Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Metadata]
Name=ForexFactoryCalendar
Author=Talasan Nicholson
Version=0.1
[Variables]
GET=<tr.*data-eventid.*>.*<td class=".*time">(.*)</td>.*<td class=".*currency.*">[\r\n? | \n?](.*)[\r\n? | \n?]</td>.*<span class=".*calendar__impact.*">.*<span title="(Low|Medium|High).*">.*<span class="calendar__event-title">(.*)</span>.*</tr>.*</tr>.*
LOW=255,255,255,125
MED=247,151,54
HIGH=221,0,0
[MeasureDate]
Measure=Time
Format=%b%e.%Y
[MeasureSite]
Measure=WebParser
URL=https://www.forexfactory.com/calendar.php?day=[&MeasureDate]
RegExp=(?siU)#GET##GET##GET##GET##GET#
Debug=2
UpdateRate=1000
[Text]
X=10R
Y=0r
FontSize=7
FontFace=Roboto Mono
FontColor=255,255,255
AntiAlias=1
; ---------------------------------
; Event 1/?
[MeasureTime_1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
[MeasureCurrency_1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=2
[MeasureImpact_1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=3
DynamicVariables=1
Substitute="Low":"1", "Medium": "2", "High": "3"
IfCondition=[MeasureImpact_1] = 1
IfTrueAction=[!SetOption MeterImpact_1 Text "Low"][!SetOption MeterImpact_1 FontColor #LOW#]
IfCondition2=[MeasureImpact_1] = 2
IfTrueAction2=[!SetOption MeterImpact_1 Text "Med"][!SetOption MeterImpact_1 FontColor #MED#]
IfCondition3=[MeasureImpact_1] = 3
IfTrueAction3=[!SetOption MeterImpact_1 Text "High"][!SetOption MeterImpact_1 FontColor #HIGH#]
[MeasureTitle_1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=4
[MeterTime_1]
Meter=String
X=0
W=30
MeasureName=MeasureTime_1
MeterStyle=Text
[MeterCurrency_1]
Meter=String
MeasureName=MeasureCurrency_1
MeterStyle=Text
[MeterImpact_1]
Meter=String
MeasureName=MeasureImpact_1
MeterStyle=Text
[MeterTitle_1]
Meter=String
MeasureName=MeasureTitle_1
MeterStyle=Text
; ---------------------------------
; Event 2/?
[MeasureTime_2]
Measure=WebParser
URL=[MeasureSite]
StringIndex=5
[MeasureCurrency_2]
Measure=WebParser
URL=[MeasureSite]
StringIndex=6
[MeasureImpact_2]
Measure=WebParser
URL=[MeasureSite]
StringIndex=7
DynamicVariables=1
Substitute="Low":"1", "Medium": "2", "High": "3"
IfCondition=[MeasureImpact_2] = 1
IfTrueAction=[!SetOption MeterImpact_2 Text "Low"][!SetOption MeterImpact_2 FontColor #LOW#]
IfCondition2=[MeasureImpact_2] = 2
IfTrueAction2=[!SetOption MeterImpact_2 Text "Med"][!SetOption MeterImpact_2 FontColor #MED#]
IfCondition3=[MeasureImpact_2] = 3
IfTrueAction3=[!SetOption MeterImpact_2 Text "High"][!SetOption MeterImpact_2 FontColor #HIGH#]
[MeasureTitle_2]
Measure=WebParser
URL=[MeasureSite]
StringIndex=8
[MeterTime_2]
Y=15r
X=0
W=30
Meter=String
MeasureName=MeasureTime_2
MeterStyle=Text
[MeterCurrency_2]
Meter=String
MeasureName=MeasureCurrency_2
MeterStyle=Text
[MeterImpact_2]
Meter=String
MeasureName=MeasureImpact_2
MeterStyle=Text
[MeterTitle_2]
Meter=String
MeasureName=MeasureTitle_2
MeterStyle=Text
; ---------------------------------
; Event 3/?
[MeasureTime_3]
Measure=WebParser
URL=[MeasureSite]
StringIndex=9
[MeasureCurrency_3]
Measure=WebParser
URL=[MeasureSite]
StringIndex=10
[MeasureImpact_3]
Measure=WebParser
URL=[MeasureSite]
StringIndex=11
DynamicVariables=1
Substitute="Low":"1", "Medium": "2", "High": "3"
IfCondition=[MeasureImpact_3] = 1
IfTrueAction=[!SetOption MeterImpact_3 Text "Low"][!SetOption MeterImpact_3 FontColor #LOW#]
IfCondition2=[MeasureImpact_3] = 2
IfTrueAction2=[!SetOption MeterImpact_3 Text "Med"][!SetOption MeterImpact_3 FontColor #MED#]
IfCondition3=[MeasureImpact_3] = 3
IfTrueAction3=[!SetOption MeterImpact_3 Text "High"][!SetOption MeterImpact_3 FontColor #HIGH#]
[MeasureTitle_3]
Measure=WebParser
URL=[MeasureSite]
StringIndex=12
[MeterTime_3]
Y=15r
X=0
W=30
Meter=String
MeasureName=MeasureTime_3
MeterStyle=Text
[MeterCurrency_3]
Meter=String
MeasureName=MeasureCurrency_3
MeterStyle=Text
[MeterImpact_3]
Meter=String
MeasureName=MeasureImpact_3
MeterStyle=Text
[MeterTitle_3]
Meter=String
MeasureName=MeasureTitle_3
MeterStyle=Text
; ---------------------------------
; Event 3/?
[MeasureTime_4]
Measure=WebParser
URL=[MeasureSite]
StringIndex=13
[MeasureCurrency_4]
Measure=WebParser
URL=[MeasureSite]
StringIndex=14
[MeasureImpact_4]
Measure=WebParser
URL=[MeasureSite]
StringIndex=15
DynamicVariables=1
Substitute="Low":"1", "Medium": "2", "High": "3"
IfCondition=[MeasureImpact_4] = 1
IfTrueAction=[!SetOption MeterImpact_4 Text "Low"][!SetOption MeterImpact_4 FontColor #LOW#]
IfCondition2=[MeasureImpact_4] = 2
IfTrueAction2=[!SetOption MeterImpact_4 Text "Med"][!SetOption MeterImpact_4 FontColor #MED#]
IfCondition3=[MeasureImpact_4] = 3
IfTrueAction3=[!SetOption MeterImpact_4 Text "High"][!SetOption MeterImpact_4 FontColor #HIGH#]
[MeasureTitle_4]
Measure=WebParser
URL=[MeasureSite]
StringIndex=16
[MeterTime_4]
Y=15r
X=0
W=30
Meter=String
MeasureName=MeasureTime_4
MeterStyle=Text
[MeterCurrency_4]
Meter=String
MeasureName=MeasureCurrency_4
MeterStyle=Text
[MeterImpact_4]
Meter=String
MeasureName=MeasureImpact_4
MeterStyle=Text
[MeterTitle_4]
Meter=String
MeasureName=MeasureTitle_4
MeterStyle=Text
; ---------------------------------
; Event 3/?
[MeasureTime_5]
Measure=WebParser
URL=[MeasureSite]
StringIndex=17
[MeasureCurrency_5]
Measure=WebParser
URL=[MeasureSite]
StringIndex=18
[MeasureImpact_5]
Measure=WebParser
URL=[MeasureSite]
StringIndex=19
DynamicVariables=1
Substitute="Low":"1", "Medium": "2", "High": "3"
IfCondition=[MeasureImpact_5] = 1
IfTrueAction=[!SetOption MeterImpact_5 Text "Low"][!SetOption MeterImpact_5 FontColor #LOW#]
IfCondition2=[MeasureImpact_5] = 2
IfTrueAction2=[!SetOption MeterImpact_5 Text "Med"][!SetOption MeterImpact_5 FontColor #MED#]
IfCondition3=[MeasureImpact_5] = 3
IfTrueAction3=[!SetOption MeterImpact_5 Text "High"][!SetOption MeterImpact_5 FontColor #HIGH#]
[MeasureTitle_5]
Measure=WebParser
URL=[MeasureSite]
StringIndex=16
[MeterTime_5]
Y=15r
X=0
W=30
Meter=String
MeasureName=MeasureTime_5
MeterStyle=Text
[MeterCurrency_5]
Meter=String
MeasureName=MeasureCurrency_5
MeterStyle=Text
[MeterImpact_5]
Meter=String
MeasureName=MeasureImpact_5
MeterStyle=Text
[MeterTitle_5]
Meter=String
MeasureName=MeasureTitle_5
MeterStyle=Text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.