Loop measure ループ対策

Measure=Loop Creates a looping counter between two values.Measure=Loop 2つの値の間にループカウンターを作成します。

The measure will be the value of StartValue for one update, will increment based on the value of Increment on each subsequent update, and will be the value of EndValue for one update. If LoopCount is other than 1, the loop will then repeat.メジャーはStartValue、1回の更新に対するの値にIncrementなり、後続の各更新でのの値に基づいて増加し、1回の更新に対するのになりますEndValueLoopCountそれ以外の場合は1、ループが繰り返されます。

On each loop, if the value of Increment is such that the final increment would cause the value to overrun the value of EndValue, the final increment will be reduced to the remainder required to have the loop end at EndValue.各ループで、の値がIncrement最終の増分によって値がの値をオーバーランするような値であるEndValue場合、最終の増分は、ループを終了させるのに必要な残りの部分まで減少しEndValueます。

The measure will have a range that is the difference between StartValue and EndValue for use by meters requiring a percentage. There cannot be a negative percentage, so the range will always be lowest value to highest value.メジャーには、パーセンテージを必要とするメーター間の差StartValueEndValue使用する差の範囲があります。負のパーセンテージはあり得ないので、範囲は常に最小値から最大値までになります。

Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will cause the loop to be reset and start over with the new values.4つのメジャーオプションのいずれかを動的に変更したり、メジャーのInvertMeasureを動的に変更したりすると、ループがリセットされ、新しい値で最初からやり直されます。

Note: All options must be positive or negative whole numbers, or formulas that resolve to whole numbers. Fractional values will be truncated.注:すべてのオプションは、正または負の整数、または整数に解決される式でなければなりません。小数値は切り捨てられます。

Optionsオプション

General measure options一般的な測定オプション
All general measure options except AverageSize are valid. MinValue and MaxValue are automatically set based on StartValue and EndValue, and may not be manually set or changed.を除くすべての一般的な測定オプションAverageSizeは有効です。MinValueとにMaxValue基づいて自動的に設定されStartValueEndValue手動で設定または変更することはできません。
StartValue Default: 1StartValue デフォルト: 1

The starting value for the loop. This may be any positive or negative whole number.ループの開始値 これは正または負の整数です。

EndValue Default: 100EndValue デフォルト: 100

The ending value for the loop. This may be any positive or negative whole number.ループの終了値 これは正または負の整数です。

Increment Default: 1Increment デフォルト: 1

A positive or negative whole number by which the counter will be incremented on each update.更新ごとにカウンタが増加する正または負の整数。

LoopCount Default: 0LoopCount デフォルト: 0

The number of times the loop will be executed. The default of 0 will endlessly repeat. When LoopCount is reached, the measure will stop at and maintain the value of the EndValue option.ループが実行される回数。のデフォルト0は際限なく繰り返されます。LoopCountに達すると、メジャーは停止してEndValueオプションの値を維持します。

Measure Commands測定コマンド

Commands that can be sent to a Loop measure using the !CommandMeasure bang.!CommandMeasure bang を使用してループ小節に送信できるコマンド。

Reset

This will cause the measure to reset the loop and restart using the current values for all options.これにより、メジャーはループをリセットし、すべてのオプションの現在の値を使用して再開します。

Example: [!CommandMeasure MeasureName "Reset"]例: [!CommandMeasure MeasureName "Reset"]

Note: Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will automatically perform a reset of the loop. This command would not be required.注: 4つのメジャーオプションのいずれかを動的に変更したり、メジャーのInvertMeasureを動的に変更したりすると、自動的にループがリセットされます。このコマンドは不要です。

Examples

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureLoop1]
Measure=Loop
StartValue=37
EndValue=59
Increment=1
LoopCount=0

[MeasureLoop2]
Measure=Loop
StartValue=10
EndValue=0
Increment=-1
LoopCount=1

[MeterLoop1]
Meter=String
MeasureName=MeasureLoop1
W=154
H=50
X=77
StringAlign=Center
FontSize=35
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
LeftMouseUpAction=[!TogglePauseMeasure MeasureLoop1]
MiddleMouseUpAction=[!CommandMeasure MeasureLoop1 "Reset"]

[MeterLoop2]
Meter=String
MeasureName=MeasureLoop2
W=154
H=50
X=77
Y=10R
StringAlign=Center
FontSize=35
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
LeftMouseUpAction=[!TogglePauseMeasure MeasureLoop2]
MiddleMouseUpAction=[!CommandMeasure MeasureLoop2 "Reset"]

If InvertMeasure is set to 1, the opposite of the value generated by the loop will be returned. This can have the effect of reversing the direction of the loop. Toggling InvertMeasure with !SetOption can create a "ping-pong" effect with the measure.InvertMeasureがに設定されている場合1、ループによって生成された値の反対が返されます。これはループの方向を逆にする効果があります。!SetOptionを使って切り替えるInvertMeasureと、メジャーで "ピンポン"効果を生み出すことができます。

[Rainmeter]
Update=500
DynamicWindowSize=1
AccurateText=1

[Variables]
Start=0
End=10
Incr=1

[MeasureLoop]
Measure=Loop
StartValue=#Start#
EndValue=#End#
Increment=#Incr#
LoopCount=1

[MeasurePingPong]
Measure=Calc
IfCondition=MeasureLoop = #End#
IfTrueAction=[!SetOption MeasureLoop InvertMeasure 1][!UpdateMeasure MeasureLoop]
IfCondition2=MeasureLoop = #Start#
IfTrueAction2=[!SetOption MeasureLoop InvertMeasure 0][!UpdateMeasure MeasureLoop]

[MeterLoop]
Meter=String
MeasureName=MeasureLoop
W=154
H=50
X=77
StringAlign=Center
FontSize=35
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1

関連記事

スポンサーリンク

SPACE関数 スペース文字列を作成する

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る