It is currently May 21st, 2024, 6:01 pm

Some problems with Google Calendar + Omnimo skin

Get help with creating, editing & fixing problems with skins
skittleys
Posts: 1
Joined: January 14th, 2011, 2:50 pm

Some problems with Google Calendar + Omnimo skin

Post by skittleys »

I've programmed in many languages, but this is my first stab at Rainmeter!

I'm trying to edit one of the Google Calendar panels/skins in the Omnimo 3.1 pack. I've encountered 2 problems that are probably simple to fix but I can't figure it out!

1) The date is coming out as "Tue Jan 18, " -- I can't figure out where that comma's coming from or how to get rid of it.

2) I'm trying to make it display a 5th item. I've made sure to copy + modify parts of the existing script to make [Item5], [Item5Day], and [5]; I've also changed the url parameter to max-results=5. I can't find anything else that needs modifying!

Below is the INI file (I can't attach either .ini or .txt!) and a screenshot of the panel. My private information is all in the separate UserVariables.inc file (not included).

Thanks in advance!!!

P.S. There seems to be some screwy code in here. There's several references to the omnimotest calendar. This is how it was in the original file. There's also a variable URL=#privatexmlfeed#... which grabs my info from the separate variables file. It does work, so I've left this part as-is.

rainmeter-gcal-omnimo.jpg

Code: Select all

[Rainmeter]
MouseActionCursor=0
MiddleMouseUpAction=!RainmeterDeactivateConfig
MouseOverAction=!execute [!RainmeterShowMeter size][!RainmeterShowMeter btn1][!RainmeterShowMeter 
MeterChange][!RainmeterHideMeter Corner1][!RainmeterShowMeter MeterMenu][!RainmeterShowMeter 
MeterClose][!RainmeterShowMeter MeterChange][!RainmeterRedraw]
MouseLeaveAction=!execute [!RainmeterHideMeter size][!RainmeterHideMeter btn1][!RainmeterHideMeter 
MeterChange][!RainmeterShowMeter Corner1][!RainmeterShowMeter MeterDay][!RainmeterShowMeter 
MeterMonth][!RainmeterShowMeter Corner][!RainmeterHideMeter MeterMenu][!RainmeterHideMeter 
MeterClose][!RainmeterHideMeter MeterChange][!RainmeterRedraw]
MiddleMouseDownAction=!RainmeterDeactivateConfig
Update=#updaterate#000

;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Author=Xyrfo and fediaFedia
License=
Variant=
Preview=

;End of added Metadata



[Gcal]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=#privatexmlfeed#?max-results=5&futureevents=true&singleevents=true&orderby=starttime&sortorder=a
RegExp="(?siU)<email>.*#GET##GET##GET##GET#"
Substitute="http://www.google.com/":"http://www.google.co.uk/"
;Url=http://www.google.com/calendar/feeds/omnimotest%40gmail.com/private-4dcef559fd54977140cc784213

a778f1/basic
DynamicVariables=1

[shadow]
Meter=Image
ImageName=#SKINSPATH#\WP7\Common\Borders\#shadow#2.png
x=0
y=0
w=(#height#+#height#+20)
h=(#height#+10)
ImageTint=#bordercolor#
Greyscale=1 

[act]
Meter=Image
SolidColor=0,0,0,1
x=5
y=5
w=(#height#*2)
h=(#height#-20)
LeftMouseUpAction=!Execute ["http://www.google.com/calendar/render"]

[bg]
Meter=Image
ImageName=#Imagedir#\btn32.png
x=5
y=5
w=(#height#*2+10)
h=#height#
ImageTint=#colorskin#,#opacity#
Greyscale=1

[btn1]
Meter=IMAGE
ImageName=#Imagedir#\btn32.png
X=5
Y=5
w=(#height#*2+10)
h=#height#
Hidden=1
ImageTint=#colorskin2#,#opacity2#
Greyscale=1


[overlay]
Meter=Image
ImageName=#SKINSPATH#\WP7\Common\Overlay\#overlay#.png
x=5
y=5
UpdateDivider=864000
w=(#height#*2+10)
h=#height#


[Text]
Meter=String
X=(#height#/50+10)
StringAlign=left
Y=(#Height#/1.217+5)
MeterStyle=DriveText
FontColor=#textcolor2#,255
FontSize=(#height#/12)
FontFace=#fonttype#
Text=#paneltitle#
Antialias=1

[Variables]
@include=#SKINSPATH#\WP7\Common\Variables\UserVariables.inc
FontName=Segoe UI Light
FontColor=255,255,255
MarkerColor=255,255,255,100
GET=.*(?(?=.*<title).*<title.*>(.*)</title><summary.*: (.*)201.*)
SaturdaySunday=255,255,255
@include3=#CURRENTPATH#\size.inc
@include5=#CURRENTPATH#\UserVariables.inc
@include4=#SKINSPATH#\WP7\Common\color\color.inc
@include2=#SKINSPATH#\WP7\Common\Variables\Languages\lang.inc
gcal.URL=omnimotest%40gmail.com/private-4dcef559fd54977140cc784213a778f1
Day1=M
Day2=T
Day3=W
Day4=T
Day5=F
Day6=S
Day7=S

[Item1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=1
Substitute=#subsitute.Item#

[Item1Day]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=2
DynamicVariables=1

[Item2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=3
Substitute=#subsitute.Item#

[Item2Day]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=4

[Item3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=5
Substitute=#subsitute.Item#

[Item3Day]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=6

[Item4]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=7
Substitute=#subsitute.Item#

[Item4Day]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=8

[Item5]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=9
Substitute=#subsitute.Item#

[Item5Day]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Gcal]
StringIndex=10

[MeasureDate]
Measure=Time
Format=%d

[MeasureWeekDayNum]
Measure=Time
Format=%A

[MeasureMonth]
Measure=Time
Format=%A

[MeasureMthNum]
Measure=Time
Format=%m


[MeterMonth]
MeasureName=MeasureMonth
Meter=String
X=(#height#*2-(#height#/2)+8)
Y=(#Height#/1.217+8)
StringAlign=CENTER
StringStyle=NORMAL
FontColor=#textcolor2#,255
FontFace=#FontFaceUI#
FontSize=(#height#/12)
AntiAlias=1

[MeterDay]
MeasureName=MeasureDate
Meter=String
X=(#height#*2-(#height#/5-12))
Y=(#height#-(#height#/2-32))
StringAlign=CENTER
StringStyle=NORMAL
FontColor=#textcolor2#,255
FontFace=#FontFaceUI#
FontSize=(#height#/3-20)
AntiAlias=1
StringStyle=BOLD


[MeterClose]
Meter=BUTTON
ButtonImage=#SKINSPATH#WP7\Common\Panel\Close.png
X=(#Height#+#Height#+5) 
Y=5
ButtonCommand=!RainmeterDeactivateConfig
Hidden=1



[Title]
Meter=STRING
MeasureName=Item1
X=0
Y=-5
FontColor=#TextColor2#,255
FontSize=(#height#/5)
FontFace=#FontFaceLight#
Antialias=1
Hidden=1

[style1]
W=(#height#+#height#-5)
H=(#height#/12)
FontColor=#TextColor2#
FontSize=(#height#/17)
FontFace=#Font#
StringAlign=LEFT
StringStyle=NORMAL
AntiAlias=1
ClipString=1
X=(#height#/10)
y=(#height#/8)r


[1]
Meter=STRING
MeterStyle=style1
Text=[Item1Day]: [Item1]
Y=(#height#/12)
DynamicVariables=1

[2]
Meter=STRING
MeterStyle=style1
Text=[Item2Day]: [Item2]
DynamicVariables=1

[3]
Meter=STRING
MeterStyle=style1
Text=[Item3Day]: [Item3]
DynamicVariables=1

[4]
Meter=STRING
MeterStyle=style1
Text=[Item4Day]: [Item4]
DynamicVariables=1

[5]
Meter=STRING
MeterStyle=style1
Text=[Item5Day]: [Item5]
DynamicVariables=1

[size]
Meter=BUTTON
ButtonImage=#SKINSPATH#WP7\Common\Panel\size.png
X=(#Height#+#Height#+5) 
Y=(#Height#-5)
ButtonCommand=!Execute ["#SKINSPATH#\WP7\Common\Size\size.exe" "#CURRENTCONFIG#" double]
Hidden=1


[MeterChange]
Meter=BUTTON
ButtonImage=#SKINSPATH#WP7\Common\Panel\change.png
X=(#Height#+#Height#+5)
Y=15
ButtonCommand=!Execute [!RainmeterActivateConfig "WP7\Panels\GoogleCalendar" "GoogleCalendar.ini"]
Hidden=1
You do not have the required permissions to view the files attached to this post.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Some problems with Google Calendar + Omnimo skin

Post by smurfier »

You need to make (at least) one other change:

Code: Select all

[Gcal]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=#privatexmlfeed#?max-results=5&futureevents=true&singleevents=true&orderby=starttime&sortorder=a
RegExp="(?siU)<email>.*#GET##GET##GET##GET##GET#"
Substitute="http://www.google.com/":"http://www.google.co.uk/"
;Url=http://www.google.com/calendar/feeds/omnimotest%40gmail.com/private-4dcef559fd54977140cc784213
You need to add a fifth #Get# to the regular expression part of the [Gcal] measure.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .