It is currently April 19th, 2024, 10:24 am

How to create a basic calendar Skin? Please Help

Get help with creating, editing & fixing problems with skins
arthur7227
Posts: 42
Joined: April 10th, 2020, 6:25 pm

How to create a basic calendar Skin? Please Help

Post by arthur7227 »

Hello, RainMeter friends,
can you please help

Im using this script

Code: Select all

[Rainmeter]
BackgroundMode=1
Author=
AppVersion=1001000
Update=1000

; --------------------------- Change the following to suit your needs

[Variables]
ColorBorder=255,255,255,60
Font=Verdana
Size=50
Color=255,255,255,250
PATH="C:\System\Calendar.exe"
LinkName=TEST

; --------------------------- Font Effects

[StyleFont1]
StringAlign=LEFT
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontFace=#Font#
FontSize=#Size#
FontColor=#Color#
AntiAlias=1

; --------------------------- Meters \ Frame Data

[Border]
Meter=IMAGE
SolidColor=#ColorBorder#
X=0
Y=1
H=1
W=180

[Background]
Meter=IMAGE
SolidColor=0,0,0,40
X=0
Y=2
W=180
H=18

[Border2]
Meter=IMAGE
SolidColor=#ColorBorder#
X=0
Y=20
H=1
W=180

; --------------------------- Meters \ Displayed Data

[Launcher1]
Meter=STRING
MeterStyle=StyleFont1
X=0
Y=3
H=20
W=180
Text=#LinkName#
LeftMouseUpAction=!Execute ["#PATH#"]
MouseActionCursor=1

to create a skin that can launch a program by click on it.

This is very handy, and I like how smooth it works.

My question is :
What can I change in this Skin, to convert the simple text of the Skin (which is the visible body of the skin) into Calendar ?
so instead of text it will show the current date

What I want is to change this
Image
into this
Image

thanks
Last edited by arthur7227 on November 9th, 2022, 4:59 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to create a basic calendar Skin? Please Help

Post by balala »

arthur7227 wrote: November 9th, 2022, 3:40 pm My question is :
What can I change in this Skin, to convert the simple text of the Skin (which is the visible body of the skin) into Calendar ?
so instead of text it will show the current date
First you need a Time measure, which returns the date. Add for instance the following measure to your code:

Code: Select all

[MeasureDate]
Measure=Time
Format=%d / %m
Note that this measure as it is posted above returns the date as day / month (for instance 09 / 11 for today). I don't realize what the 18 / 03 does mean in your screenshot (maybe March 18th?). However what controls how the date is shown is the Format option. In the above [MeasureDate] measure, the Format=%d / %m means that the measure returns the date as day (represented by %d) followed by a slash (/), and finally the month (represented by %m). If you want to change this, here you have the available format codes which you can use to set the desired date format.
If you did add this measure, replace the Text option of the [Launcher1] meter with Text=%1. Along with this you also have to add the MeasureName=MeasureDate option to the same [Launcher1] meter as well.
Did you get what you want?
arthur7227
Posts: 42
Joined: April 10th, 2020, 6:25 pm

Re: How to create a basic calendar Skin? Please Help

Post by arthur7227 »

balala wrote: November 9th, 2022, 4:10 pm First you need a Time measure, which returns the date. Add for instance...
Hello, [mention]balala[/mention], thanks for your reply!
I followed yuor instructions and managed to make it work.
Thank you very much, yes that helped a lot

If anyone may find it useful, here is my final code :

Code: Select all

[Rainmeter]
BackgroundMode=1
Author=
AppVersion=1001000
Update=1000

; --------------------------- Change the following to suit your needs

[MeasureDate]
Measure=Time
Format=%d | %m

[Variables]
Font=Century Gothic Paneuropean Light
TextAlign=CenterCenter
Size=33
Color=178,201,255,206
PATH="C:\System\Calendar.exe"
LinkName=%1    


; --------------------------- Font Effects

[StyleFont1]
StringAlign=LEFT
StringStyle=BOLD
FontFace=#Font#
FontSize=#Size#
FontColor=#Color#
AntiAlias=1

; --------------------------- Meters \ Frame Data


; --------------------------- Meters \ Displayed Data

[Launcher1]
Meter=STRING
MeterStyle=StyleFont1
MeasureName=MeasureDate

Text=#LinkName#
LeftMouseUpAction=!Execute ["#PATH#"]
MouseActionCursor=1
Last edited by arthur7227 on November 9th, 2022, 5:02 pm, edited 1 time in total.
arthur7227
Posts: 42
Joined: April 10th, 2020, 6:25 pm

Re: How to create a basic calendar Skin? Please Help

Post by arthur7227 »

balala wrote: November 9th, 2022, 4:10 pm
Did you get what you want?
may I ask for advanced help pls ?

the problem here is :

I want to run program by clicking on the skin, and it does the job, BUT if I point the mose 1 px aside from the letter of text, the system stop recognizing the skin anymore, despite the fact there is another symbol of the Skin in this area but 2px to the left.

My qiestion is :
is it possible to add a background parameter or smth, so that when I poin te mouse on the area of the skin, but not on the visible current element of the skin, I still can work with it ?

in other words, it is not a massive icon, but lets say a "1" number

if I make the font size 10, it becomes a small little element, and to click on in becomes a "pixel hunting" game.

How can I fix that ? I believe background may help, but I dont know ho to work with it
User avatar
SilverAzide
Rainmeter Sage
Posts: 2603
Joined: March 23rd, 2015, 5:26 pm

Re: How to create a basic calendar Skin? Please Help

Post by SilverAzide »

arthur7227 wrote: November 9th, 2022, 5:25 pm may I ask for advanced help pls ?

the problem here is :

I want to run program by clicking on the skin, and it does the job, BUT if I point the mose 1 px aside from the letter of text, the system stop recognizing the skin anymore, despite the fact there is another symbol of the Skin in this area but 2px to the left.

My qiestion is :
is it possible to add a background parameter or smth, so that when I poin te mouse on the area of the skin, but not on the visible current element of the skin, I still can work with it ?

in other words, it is not a massive icon, but lets say a "1" number

if I make the font size 10, it becomes a small little element, and to click on in becomes a "pixel hunting" game.

How can I fix that ? I believe background may help, but I dont know ho to work with it
The simplest fix is to change the background mode of your skin in the [Rainmeter] section. You currently have it set to 1 (transparent), so change it to 2 (solid), then add the line SolidColor=0,0,0,1. This is described in the manual under Background Options.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to create a basic calendar Skin? Please Help

Post by balala »

arthur7227 wrote: November 9th, 2022, 5:25 pm My qiestion is :
is it possible to add a background parameter or smth, so that when I poin te mouse on the area of the skin, but not on the visible current element of the skin, I still can work with it ?
Even if it's a proper procedure, I think SilverAzide's reply doesn't really help in this case, because it doesn't make the whole surface of the date clickable. Instead, I'd add the same SolidColor=0,0,0,1 option not to the [Rainmeter] section, but to the [Launcher1] meter. If you do so, the BackgroundMode=2 is not needed anymore. Especially not on the [Launcher1] meter, in case you thought to move it along with the SolidColor option. In fact, this option (BackgroundMode) can't be used on any meter, just on the [Rainmeter] section of the skin.
If you want (I often do), the clickable surface can easily be extended, adding a Padding=15,5,15,5 option to the [Launcher1] meter (obviously you can experiment, to get the best values for your needs). To check how large the clickable area is, you can temporary modify the SolidColor=0,0,0,1 option added to the meter to a visible color. For instance, to SolidColor=0,0,0,100. If you find the best value, you can replace the color back to SolidColor=0,0,0,1, is you want.