Option Types オプションの種類

In the most basic sense, a skin in Rainmeter is controlled by a .ini file consisting of sections, options, and option values.最も基本的な意味では、Rainmeterのスキンはセクション、オプション、およびオプション値からなる.iniファイルによって制御されます。

[SectionName]
OptionName=OptionValue

The skin can have various kinds of sections. These include:スキンは様々な種類の部分を有することができる。これらが含まれます:

  • [Rainmeter][雨量計]
  • [Metadata][メタデータ]
  • [Variables][変数]
  • [MeasureName][メジャー名]
  • [MeterName][メーター名]

These sections can have many options and option values. Some of which are general in nature, and some of which are very specific to the type of section, for instance specific options for the various measure, plugin or meter types.これらのセクションは多くのオプションとオプション値を持つことができます。その一部は一般的な性質のもので、一部はセクションの種類に非常に固有のものです。たとえば、さまざまなメジャー、プラグイン、メーターの種類に固有のオプションなどです。

While the options used can be general or specific, the options will fall into one of the following broad type categories:使用されるオプションは一般的なものでも固有のものでもかまいませんが、オプションは次の広範な種類のカテゴリのいずれかに分類されます。

String options文字列オプション

String options require a text value.文字列オプションにはテキスト値が必要です。

Text=Hello World
MyVar=Hello World

Number options番号オプション

Number options require either a number or a formula.番号オプションには、番号または式のいずれかが必要です。

; The following lines are equivalent:
FontSize=42
FontSize=(40 + 2)
FontSize=(2 > 1 ? 42 : 666)

Path optionsパスオプション

Path options specify the relative or absolute path of either a file or a folder (depending on the option). For example, the path and name of an image file is expected with ImageName.パスオプションは、ファイルまたはフォルダのどちらかの相対パスまたは絶対パスを指定します(オプションによって異なります)。たとえば、イメージファイルのパスと名前は、と想定されていImageNameます。

There are built-in variables provided that automatically resolve to paths for the Rainmeter application or individual skins. These are described at Path Variables and Skin Variables.

In addition, there is a built-in variable #@# that resolves to the @Resources folder in the root config folder of the current skin.

; Paths relative to the current skin folder:
ImageName=lolcat.png
ImageName=..\lolcat.png

; Absolute path:
ImageName=C:\lolcats\lolcat.png

; Path to the current skin folder:
ImageName=#CURRENTPATH#lolcat.png

; Path to the @Resources\Images folder under the root config of the current skin:
ImageName=#@#Images\lolcat.png

Color optionsカラーオプション

Color options such as SolidColor and FontColor should use the RGBA (red-green-blue-alpha) notation in either the hexadecimal or decimal form. The color results from a mixing of the red, green and blue components of the option, with the transparency (alpha channel) of the element set by the fourth component.

Decimal colors are specified as RRR,GGG,BBB,AAA, where RRR, GGG, BBB, and AAA are decimal numbers from 0 to 255. Formulas can also be used in place of the numbers.小数色はとして指定されている場合、、、、および0〜255式から小数も数字の代わりに使用することができるされています。RRR,GGG,BBB,AAARRRGGGBBBAAA

Hexadecimal colors are specified as RRGGBBAA, where RR, GG, BB, and AA are hexadecimal numbers from 00 to FF.進色がとして指定され、ここで、、、および00からFFまでの16進数です。RRGGBBAARRGGBBAA

Note: The alpha component is optional. As with the other components it is a value from 0 to 255 (00 to FF), with 0 being completely invisible (and the meter will not react to the mouse) to 255, which is completely opaque. The default is 255 (or FF). To have a element be "invisible" while still reacting to the mouse, use an alpha value of 1.注:アルファ成分はオプションです。他のコンポーネントと同様に、0から255(00からFF)までの値で、0は完全に見えない(そしてメーターはマウスに反応しない)、255は完全に不透明です。デフォルトは255(またはFF)です。まだマウスに反応している間に要素を「見えない」ようにするには、アルファ値1を使用します。

; The following lines are equivalent to solid opaque red:
SolidColor=255,0,0,255
SolidColor=255,0,0
SolidColor=(200 + 55),(2 - 2),0
SolidColor=FF0000FF
SolidColor=FF0000

Action optionsアクションオプション

Options in a skin which cause Rainmeter to take some action. Actions may be triggered by user input such as mouse actions or changing values and system events within the skin, such as IfActions or OnUpdateAction.Rainmeterに何らかのアクションを起こさせるスキン内のオプション。アクションは、マウスアクション、またはIfActionsOnUpdateActionなどのスキン内の値やシステムイベントの変更などのユーザー入力によってトリガーされることがあります。

Normally the value of an action option is going to be one or more bangs, or the execution of external commands in Windows. When multiple bangs are defined on the same action option, enclose them in square brackets [].通常、アクションオプションの値は、一の以上あることを行っている前髪、またはWindowsでの外部コマンドの実行。同じアクションオプションで複数のビッグバンが定義されている場合は、それらを角かっこで囲みます[]

; Single bang:
LeftMouseUpAction=!HideMeter SomeMeter
LeftMouseUpAction=[!HideMeter SomeMeter]

; Multiple bangs:
LeftMouseUpAction=[!HideMeter SomeMeter][!HideMeter SomeOtherMeter]

For bangs that take parameters, the arguments should be separated by a space. Parameters that contain spaces must use quotes around the parameter.パラメータをとる前髪の場合、引数はスペースで区切る必要があります。スペースを含むパラメータは、パラメータを引用符で囲む必要があります。

; These two lines are equivalent:
LeftMouseUpAction=[!HideMeter SomeMeter]
LeftMouseUpAction=[!HideMeter "SomeMeter"]

; These two are NOT equivalent. The first line will cause an error due to the spaces
; in the parameters while the second will properly set the value of SomeVariable
; to: I think, therefore I am
LeftMouseUpAction=[!SetVariable SomeVariable I think, therefore I am]
LeftMouseUpAction=[!SetVariable SomeVariable "I think, therefore I am"]

; These two may or may not be equivalent depending on the value of the #ImageFile#
; variable. If #ImageFile# contains spaces, the first line will fail. In uncertain
; cases, it is always best to use quotes as in the second line.
LeftMouseUpAction=[!SetWallpaper #ImageFile#]
LeftMouseUpAction=[!SetWallpaper "#ImageFile#"]

External Windows commands can be executed by specifying the path to the executable and any parameters. Enclose the command in square brackets [], and enclose any values with spaces in quotes.実行可能ファイルへのパスと任意のパラメータを指定することで、外部のWindowsコマンドを実行できます。コマンドを角括弧[]で囲み、値をスペースで二重引用符で囲みます。

LeftMouseUpAction=["C:\Windows\Notepad.exe" MyFile.txt]
; Runs Notepad.exe and loads the file MyFile.txt.

LeftMouseUpAction=["https://forum.rainmeter.net"]
; Opens the URL in the default web browser.

Magic Quotes魔法の名言

A parameter to a bang that contains embedded quotes should be surrounded by a what we call """magic quotes""". A pair of triple quotes.埋め込まれた引用符を含むbangへのパラメータは、我々が ""魔法の引用符 ""と呼ぶもので囲まれるべきです。三重引用符のペア。

; The first line will fail due to extra quotes. The second line will properly log
; Example string: Bob said "hello" to Susan
LeftMouseUpAction=[!Log "Bob said "hello" to Susan"]
LeftMouseUpAction=[!Log """Bob said "hello" to Susan"""]

Escaping a #Variable# or [MeasureName]#変数#または[MeasureName]をエスケープする

When using #VarName# or [MeasureName] in an action option, the current value of the variable or measure will be used. To have the literal string "#VarName#" or "[MeasureName]" used, in a !SetOption value for instance, surround the variable or measure name with asterisk * characters.アクションオプションを使用#VarName#または[MeasureName]アクションオプションで使用する場合は、変数またはメジャーの現在の値が使用されます。たとえば!SetOption値でリテラル文字列 "#VarName#"または "[MeasureName]"を使用するには、変数名またはメジャー名をアスタリスク*文字で囲みます。

For example, use #*VarName*# or [*MeasureName*] to tell Rainmeter to "escape" the variable or measure name. You do not want the value resolved, but rather used as a literal string.

LeftMouseUpAction=!SetOption SomeMeter FontSize #VarName#
; The FontSize option for SomeMeter will be set to the current value of the variable.

LeftMouseUpAction=!SetOption SomeMeter FontSize #*VarName*#
; The FontSize option for SomeMeter will be set to the the string "#VarName#"

LeftMouseUpAction=!SetOption SomeMeter FontSize [MeasureName]
; The FontSize option for SomeMeter will be set to the current value of the measure.

LeftMouseUpAction=!SetOption SomeMeter FontSize [*MeasureName*]
; The FontSize option for SomeMeter will be set to the string "[MeasureName]".

Normal variables

  • #*VarName*#
  • [*MeasureName*]

Nested variables

  • [#*VarName*]
  • [&*MeasureName*][&*MeasureName*]

Regular expression options正規表現オプション

These options use Perl Compatible Regular Expressions (PCRE) to match specific parts of a text string. Regular expressions are used when the structure of a piece of data is known, but the content is not.これらのオプションは、テキスト文字列の特定の部分に一致させるためにPerl互換正規表現(PCRE)を使用します。データの構造がわかっていても内容がわからない場合は、正規表現が使用されます。

In Rainmeter, regular expressions are most prominently used by the WebParser plugin to interpret (or "parse") web-based or local text file data sources, but they can also be used to modify the string value of a measure using Substitute options, or to test a string in a measure with IfMatch options.Rainmeterでは、正規表現はWebベースまたはローカルのテキストファイルデータソースを解釈(または「解析」)するためにWebParserプラグインで最もよく使用されますがSubstitutionオプションを使用して数値データの文字列値を変更するためにも使用できますIfMatchオプションを使用してメジャー内の文字列をテストします

Resources for regular expressions正規表現のためのリソース

Tutorials and guides for regular expressions正規表現のチュートリアルとガイド

Help with regular expressions in WebParserWebParserの正規表現を手助けする

Information on the RSS and ATOM feed standardsRSSおよびATOMフィード規格に関する情報

関連記事

スポンサーリンク

DECODE関数 値を変換する

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

上に戻る