It is currently April 26th, 2024, 9:47 pm

Tip "The Draft" submitted by Yalishy (04/15/09

Tips and Tricks from the Rainmeter Community
sgtevmckay

Tip "The Draft" submitted by Yalishy (04/15/09

Post by sgtevmckay »

Yalishy wrote:Here are a couple of tricks I like to use with rainmeter :

Text settings

-Shadowed Text :
Image
Your normal text with no shadows code should like something like this :

Code: Select all

[MeterText]
;MeasureName=         : no measurename, only display a text
Meter=STRING
X=0
Y=0
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"
Basically, the idea is to draw the same text in a half transparent grey, under the white text. So we'll add the [MeterShadowedText] BEFORE the [MeterText] ( so rainmeter will draw it first) :
Final result :

Code: Select all

[MeterShadowedText]
;MeasureName=                         <= no measurename, only display a text
Meter=STRING
X=0
Y=0
FontColor=0, 0, 0, 160                  <= Last value is the alpha channel value
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"

[MeterText]
;MeasureName=                         <= no measurename, only display a text
Meter=STRING
X=+1r                                          <= r stand for relative position
Y=+1r                                          
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"
-Outlined Text :
Image
The trick is basically the same, the text should be drawn four times with an offset of 1 pixel in each directions; so it makes five meters

Code: Select all

[MeterOutlinedText1]
;MeasureName=
Meter=STRING
X=2
Y=2
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"


[MeterOutlinedText2]
;MeasureName=
Meter=STRING
X=2
Y=0
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"

[MeterOutlinedText3]
;MeasureName=
Meter=STRING
X=0
Y=0
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"


[MeterOutlinedText4]
;MeasureName=
Meter=STRING
X=0
Y=2
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"

[MeterText]
;MeasureName=
Meter=STRING
X=1
Y=1
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"
Clock Settings
WIP, but thanks to moshi, most of the ideas comes from him

Code Settings

-Launching others config :
Adding this line will load the tranquil clock skin ( a default skin ) on a left click, an unload it on a right click :

Code: Select all

LeftMouseDownAction=!RainmeterActivateConfig Tranquil\Clock Time.ini
RightMouseDownAction=!RainmeterDeactivateConfig Tranquil\Clock Time.ini
!RainmeterToggleConfig: same result, but it only toggle (hide, but still loaded ) the config

-Setting up a decent text editor for config Editing :
in your rainmeter.ini, under the [rainmeter] section (don't use spaces in the filename!) :

Code: Select all

ConfigEditor="C:\PROGRA~1\Scite\SciTE.exe"
or, if you're using rainmeter as a litestep module:

Code: Select all

ConfigEditor=[$TxtEditor$]
-----------------

Tricks as a Litestep modules :
If loaded as a LS module, there are quite a few tricks you can't do with the standalone version :
You can use the LS Syntax, for example in the rainmeter.ini :

Code: Select all

WindowY=$ResolutionY-80-250$ 
Don't forget to set up "SavePosition=0" if you don't want rainmeter to rewrite it's absolute position.

You can also use an evar or a themevars in a skin :

Code: Select all

LineColor=$FontActiveColor$

:arrow: Here I am :mrgreen:
User avatar
Yalishy
Posts: 3
Joined: April 14th, 2009, 7:53 am
Location: Paris, France

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by Yalishy »

Yep, I was planning to do a Tips N Tricks Thread, and here is my try :

Text settings

-Shadowed Text :
Image
Your normal text with no shadows code should like something like this :

Code: Select all

[MeterText]
;MeasureName=         : no measurename, only display a text
Meter=STRING
X=0
Y=0
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"
Basically, the idea is to draw the same text in a half transparent grey, under the white text. So we'll add the [MeterShadowedText] BEFORE the [MeterText] ( so rainmeter will draw it first) :
Final result :

Code: Select all

[MeterShadowedText]
;MeasureName=                         <= no measurename, only display a text
Meter=STRING
X=0
Y=0
FontColor=0, 0, 0, 160                  <= Last value is the alpha channel value
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"

[MeterText]
;MeasureName=                         <= no measurename, only display a text
Meter=STRING
X=+1r                                          <= r stand for relative position
Y=+1r                                          
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=8
StringAlign=CENTER
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Shadowed Text, yeah!"
-Outlined Text :
Image
The trick is basically the same, the text should be drawn four times with an offset of 1 pixel in each directions; so it makes five meters

Code: Select all

[MeterOutlinedText1]
;MeasureName=
Meter=STRING
X=2
Y=2
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"


[MeterOutlinedText2]
;MeasureName=
Meter=STRING
X=2
Y=0
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"

[MeterOutlinedText3]
;MeasureName=
Meter=STRING
X=0
Y=0
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"


[MeterOutlinedText4]
;MeasureName=
Meter=STRING
X=0
Y=2
FontColor=0, 0, 0, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"

[MeterText]
;MeasureName=
Meter=STRING
X=1
Y=1
FontColor=255, 255, 255, 255
StringStyle=NORMAL
FontSize=9
StringAlign=LEFT
FontFace=Tahoma
AntiAlias=1
Hidden=0
Prefix="My Outlined Text, yeah!"
Clock Settings
WIP, but thanks to moshi, most of the ideas comes from him
There are 2 wayfor displaying a clock :
-Using the roundline meter
Most of moshi's clocks (best ones, IMO) are using this technique
Image


It's harder to create, but i think the result is better. In the above example, each *hand* (aiguilles in french, don't know the word) is drawn by using 3 meters. Let's decompose them :
Image
-1) first you draw the shadow, almost transparent with a 1px X and Y offset
-2) Then you draw the black outline, 1px wider and longer than the hand
-3) and then you draw the hand.

In order to be more stylish, moshi added a mini hand, shorter, pointing in the opposite direction. The code is basically the same, just change the lenght of the line, and use a negative value for "StartAngle"

-Using the rotator meter :
it simply rotate an image.
Simplier, it uses only one meter to do the same result as above, but I think it's less pretty. It also can be used if you want freeform hand...Depends on what result you want.
Image

Code Settings for clocks

Hours : ValueReminder=43200
Minutes : ValueReminder=3600
Seconds: ValueReminder=600

more to come, startangle and rotationangle, offstX et OffsetY

Code Settings

-Launching others config :
Adding this line will load the tranquil clock skin ( a default skin ) on a left click, an unload it on a right click :

Code: Select all

LeftMouseDownAction=!RainmeterActivateConfig Tranquil\Clock Time.ini
RightMouseDownAction=!RainmeterDeactivateConfig Tranquil\Clock Time.ini
!RainmeterToggleConfig: same result, but it only toggle (hide, but still loaded ) the config

-Setting up a decent text editor for config Editing :
in your rainmeter.ini, under the [rainmeter] section (don't use spaces in the filename!) :

Code: Select all

ConfigEditor="C:\PROGRA~1\Scite\SciTE.exe"
or, if you're using rainmeter as a litestep module:

Code: Select all

ConfigEditor=[$TxtEditor$]
-----------------

Tricks as a Litestep modules :
If loaded as a LS module, there are quite a few tricks you can't do with the standalone version :
You can use the LS Syntax, for example in the rainmeter.ini :

Code: Select all

WindowY=$ResolutionY-80-250$ 
Don't forget to set up "SavePosition=0" if you don't want rainmeter to rewrite it's absolute position.

You can also use an evar or a themevars in a skin :

Code: Select all

LineColor=$FontActiveColor$

WIP...
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by jsmorley »

On the issue of the ConfigEditor, here is the setting you need if you use UltraEdit and install to the default location:

[Rainmeter]
ConfigEditor="C:\PROGRA~1\IDMCOM~1\ULTRAE~1\Uedit32.exe"

Silly that it requires DOS-8 formatting in 2009... :cry:
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by dragonmage »

Really? I don't use dos formatting. Mine is...
ConfigEditor="\Notepad++Portable\Notepad++Portable.exe\"
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by jsmorley »

dragonmage wrote:Really? I don't use dos formatting. Mine is...
ConfigEditor="\Notepad++Portable\Notepad++Portable.exe\"
That's because there are no spaces in your path.

If I put UltraEdit in with the actual path to the program : "C:\Program Files\IDM Computer Solutions\UltraEdit\Uedit32.exe". It won't work. Have to use the DOS-8 formatting. Not a big deal, but it's little things like this that will hinder Rainmeter from reaching the masses.
User avatar
GhostMatrix
Rainmeter Sage
Posts: 141
Joined: April 18th, 2009, 8:26 pm
Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by GhostMatrix »

jsmorley wrote: That's because there are no spaces in your path.

If I put UltraEdit in with the actual path to the program : "C:\Program Files\IDM Computer Solutions\UltraEdit\Uedit32.exe". It won't work. Have to use the DOS-8 formatting. Not a big deal, but it's little things like this that will hinder Rainmeter from reaching the masses.
If you put the full path to the program and it have spaces in it, you have to wrap it inside the " [ ] " characters and use the " !execute " in front of it.

[rainmeter]

ConfigEditor=!execute ["C:\Program Files\Notepad++\notepad++.exe"]


Work fine with me! ;)

GM
If at first you don't succeed; call it version 0.1

Image
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tip "The Draft" submitted by Yalishy (04/15/09

Post by jsmorley »

GhostMatrix wrote: If you put the full path to the program and it have spaces in it, you have to wrap it inside the " [ ] " characters and use the " !execute " in front of it.

[rainmeter]

ConfigEditor=!execute ["C:\Program Files\Notepad++\notepad++.exe"]


Work fine with me! ;)

GM
Cool. Never tried that... Dragonmage found that it also works if you put double double quotes around it too..

ConfigEditor=!execute ""C:\Program Files\Notepad++\notepad++.exe""