Rainmeter 一部分 語法 中文教程


;Meter基本元素示例:
;如果是[MeterStyle]表示Meter的公共Style,類似CSS的意義!!!
;顏色可以使用網頁的顏色定義方式,如半透明黃色:255.255.0.128=FFFF0080
[MeterTEST]
X=0
Y=0
W=100
H=20
;設為1為隱藏,0(默認值)
Hidden=0
;如只需要繪制靜態圖形或靜態文字的話可以不寫
MeasureName=MeasureStyle
FontColor=#FontColor#
FontFace=#FontFace#
FontSize=#FontSize#
;字體陰影
StringEffect=SHADOW
;字體格式
StringStyle=BOLD
;字體對齊方式
StringAlign=LEFT
;開啟抗鋸齒0 =關閉(默認值);1 =開啟;
AntiAlias=1
;左鍵按下即執行,此時禁止拖動
LeftMouseDownAction=!Execute [taskmgr.exe]
;右鍵按下即執行,此時禁止上下文菜單
RightMouseDownAction=!Execute [taskmgr.exe]
;中鍵按下即執行
MiddleMouseDownAction=!Execute [taskmgr.exe]
;左鍵按下恢復后執行,此時禁止拖動
LeftMouseUpAction=!Execute [taskmgr.exe]
;右鍵按下恢復后執行,此時禁止上下文菜單
RightMouseUpAction=!Execute [taskmgr.exe]
;中鍵按下恢復后執行
MiddleMouseUpAction=!Execute [taskmgr.exe]
;鼠標停靠后執行
MouseOverAction=!Execute [taskmgr.exe]
;鼠標離開后執行
MouseLeaveAction=!Execute [taskmgr.exe]
;當設置為1(默認值),在擁有鼠標操作的元素或按鈕元素上將改變光標指針,可以不寫
MouseActionCursor=1
;表示該Meter的刷新頻率,為全局刷新頻率的倍數
;如果[Rainmeter]里面的Update=1000,則以下代碼表示30*1000=30秒
UpdateDivider=30
;背景顏色,如果沒有設置,背景是完全透明的。
SolidColor=#SolidColor#
;背景漸變顏色
SolidColor2=#SolidColor2#
;背景顏色漸變的角度,定義的角度弧度,0(默認值)
GradientAngle=0
;顯示背景倒角;0 =沒有(默認值);1 =提高;2 =沉沒;
BevelType=0
;官網還有一項是矩陣,未研究透,所以不寫了


[MeasureMemory]
Measure=PhysicalMemory

;BAR示例:
[MeterBAR]
MeasureName=MeasureMemory
Meter=BAR
X=10
Y=10
W=100
H=20
BarColor=0,0,0,200
;BarImage可以用來代替BarColor
BarImage=#SKINSPATH#Images\Bar.png
;背景顏色,如果沒有設置,背景是完全透明的。
SolidColor=255,255,255,200
;顯示方式VERTICAL(垂直)HORIZONTAL(水平)
BarOrientation=HORIZONTAL
;是否反轉長方條的方向,應該是反轉180度,0 =否(默認值),1 =是
Flip=1

;Bitmap示例:
[MeasureDate]
Measure=Time
Format=%d

[MeterDate]
MeasureName=MeasureDate
Meter=BITMAP
X=50
Y=0
BitmapImage=number.png
BitmapFrames=10
;The number of transition frames per value. The transition frames are frames which are displayed when the meter's value changes. The same number of transition frames must be used after each regular frame. The TransitionUpdate setting in the [Rainmeter] section determines the rate at which the frames are displayed during the transition. The total duration of the transition animation is therefore TransitionUpdate * BitmapTransitionFrames. Note that BitmapFrames will always define the total number of frames in the bitmap, including the transition frames.So, for example, if the bitmap has 10 values and each transition consists of 4 additional frames, then BitmapFrames should be set to 50 and BitmapTransitionFrames to 4.
BitmapTransitionFrames=10
;If set to 1, the first frame is used only when the measured value is zero. Otherwise the frames are linearly determined by the measured value.
BitmapZeroFrame=1
;If set to 1 the bitmap is extended so display the whole value. For example if you define a bitmap that defines frames from 0 to 9 you can use this to display the measured value as the bitmap numbers.
BitmapExtend=1
;Number of digits that are drawn. The first frame is used if the value doesn't have as many digits as this defines. Works only when BitmapExtend is set to 1.
BitmapDigits=2
BitmapAlign=CENTER
;Separation between digits when BitmapDigits is higher than one. This can also be a negative number.
BitmapSeparation=0

;BUTTON按鈕示例:
[MeterNote]
;按鈕不能綁定任何的measure,即不能有MeasureName=???。
Meter=BUTTON
X=0
Y=0
ButtonImage=Button.png
ButtonCommand=!Execute [notepad.exe]

;Histogram直方圖示例:
[MeasureCPU]
Measure=CPU測量=處理器

[MeterCPU]
MeasureName=MeasureCPU
;第二個數據名稱,只有這個存在才可以使用Secondary???
SecondaryMeasureName=???
Meter=HISTOGRAM
X=0
Y=0
W=100
H=20
PrimaryColor=#Color#
SecondaryColor=#Color1#
BothColor=#Color#
SolidColor=#Color2#
PrimaryImage=Histogram.png
SecondaryImage=Histogram.png
BothImage=Histogram.png
;顯示方式VERTICAL(垂直)HORIZONTAL(水平)
BarOrientation=HORIZONTAL
;如果設置為1,直方圖自動縮放以顯示所有值。
Autoscale=1
;抗鋸齒
AntiAlias=1
;設置為1,反轉圖像
Flip=0

;Image圖像:
[MeasureQuote]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName="#PROGRAMPATH#Skins\Tranquil\"
FileFilter=*.png

[MeterImage]
Meter=IMAGE
MeasureName=MeasureQuote
X=0
Y=0
W=150
H=150
;圖片的名稱顯示
ImageName=Pictures
;圖片的路徑
Path=E:\Pictures\
;如果設置為1,圖像保持寬高比縮放;設置為0,圖像不保持寬高比縮放。
PreserveAspectRatio=1

;跳動線圖:
[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeterNetwork]
Meter=LINE
MeasureName=MeasureNetOut
MeasureName2=MeasureNetIn
X=0
Y=0
W=100
H=20
;線條數
LineCount=2
LineColor=#Color#
LineColor2=#Color2#
;設置為1的水平線條繪制在直方圖后面。
HorizontalLines=0
;直方圖顏色
HorizontalLineColor=#Color#
;實心顏色,未設置為透明
SolidColor=#SolidColor#
;線條1乘以1000
Scale=1000
;線條2乘以1000
Scale2=1000
;線條像素寬度
LineWidth=1
;自動縮放
AutoScale=1
AntiAlias=1
Flip=1

;旋轉圖形
[MeasureTime]
Measure=Time

[MeterHours]
MeasureName=MeasureTime
Meter=ROTATOR
X=0
Y=0
W=30
H=30
;旋轉圖像名稱
ImageName=Hours.png
;開始的旋轉角度,默認順時針旋轉。
StartAngle=6.2832
;旋轉角度的大小,使用負值逆時針旋轉。
RotationAngle=6.2832
;實際旋轉一周用的時間,秒。
ValueReminder=43200
;X軸旋轉中心偏移
OffsetX=14.5
;Y軸旋轉中心偏移
OffsetY=14.5

[MeterMinutes]
MeasureName=MeasureTime
Meter=ROTATOR
X=0
Y=0
W=30
H=30
ImageName=Minutes.png
StartAngle=6.2832
RotationAngle=6.2832
ValueReminder=3600
OffsetX=14.5
OffsetY=14.5

;ROUNDLINE旋轉線條:
[MeasureDisk]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1

[MeterDisk]
Meter=ROUNDLINE
MeasureName=MeasureDisk
X=0
Y=0
W=50
H=50
;線條像素寬度
LineWidth=5
;線條開始旋轉的角度,默認是順時針旋轉
StartAngle=4.712
;線條旋轉角度的大小
RotationAngle=6.283
;實際旋轉一周用的時間,秒。
ValueRemainder=60
;從旋轉中心開始的線條長度
LineLength=25
LineColor=0,0,0,200
;設置為1,顯示為餅圖
Solid=1
AntiAlias=1
;省略了幾個元素

;字符串:
[MeasureDate]
Measure=Time

[MeterDate]
MeasureName=MeasureDate
Meter=STRING
X=0
Y=0
FontColor=0,0,0,255
FontFace="Trebuchet MS"
FontSize=20
;字符串的對齊方式:LEFT, CENTER and RIGHT
StringAlign=CENTER
;風格化字符串:NORMAL, BOLD, ITALIC and BOLDITALIC
StringStyle=BOLD
;字符串的陰影:NONE, SHADOW and BORDER.有效值為:無,陰影和邊界。
StringEffect=BORDER
;字符串的陰影顏色
FontEffectColor=255,255,255,255
AntiAlias=1
AutoScale=1
Text="%1"
;在顯示的值使用小數號碼。
NumOfDecimals=1
;如果設置為1,值顯示為一個百分比。
Percentual=0
;前綴
Prefix=""
;后綴
Postfix=""
;縮放的測量值
Scale=1000
;如果設置為1,在設置了寬和高的情況下字符串超出部分自動省略並加上…
ClipString=1
;定義文本角度
Angle=0


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM