WebParser measure Webパーサーメジャー

Measure=WebParser reads and parses information from web pages.Measure=WebParser Webページから情報を読み込んで解析します。

The measure uses Perl Compatible Regular Expressions to extract information from any web page or local file.このメジャーは、Perl互換の正規表現を使用して任意のWebページまたはローカルファイルから情報を抽出します

Usage使用法

WebParser measures take the form:Webパーサーメジャーは次の形式を取ります。

[MeasureParent]
Measure=WebParser
URL=http://SomeSite.com
RegExp=(?siU)<Item>(.*)</Item>.*<Item>(.*)</Item>

This example creates two StringIndex values in what is referred to as the "parent" WebParser measure. The information is generally used in subsequent "child" WebParser measures:この例では、「親」WebParserメジャーと呼ばれるものに2つのStringIndex値を作成します。この情報は通常、後続の「子」WebParserメジャーで使用されます。

[MeasureChild1]
Measure=WebParser
URL=[MeasureParent]
StringIndex=1

[MeasureChild2]
Measure=WebParser
URL=[MeasureParent]
StringIndex=2

The values of the two child measures are now the information parsed into StringIndexes 1 and 2 by the parent measure. These can then be used with MeasureName and other options in meters.

Note: More information and examples for WebParser can be found at WebParser Tutorial and RSS/Atom Feed Tutorial.2 つの子メジャーの値は、メジャーによってStringIndex 1と2に解析された情報になりました。これらは、MeasureNameやその他のメートル単位のオプションと共に使用できます。

注: WebParserの詳細および例は、WebParser TutorialおよびRSS / Atom Feed Tutorialにあります。

Note: WebParser was previously a plugin measure.注:WebParserは以前はプラグインメジャーでした。

In many existing skins you might see the syntax:既存のスキンの多くには、次のような構文があります。

[MeasureParent]
Measure=Plugin
Plugin=WebParser
or
Plugin=WebParser.dll
or
Plugin=Plugins\WebParser.dll

WebParser still works with those forms, and changing existing skins to the new Measure=WebParser syntax is entirely optional. However, new skins created going forward should use the correct syntax for accuracy and clarity. WebParser is a measure, and not a plugin.WebParserはまだこれらのフォームで動作します、そして既存のスキンを新しいMeasure=WebParser構文に変更することは完全にオプションです。ただし、今後作成される新しいスキンは、正確さと明確さのために正しい構文を使用する必要があります。WebParserはメジャーであり、プラグインではありません。

[MeasureParent]
Measure=WebParser

Optionsオプション

General measure options一般的な測定オプション

All general measure options are valid.一般的な測定オプションはすべて有効です。

URL

URL to the site or file to be downloaded and parsed. If the name of another WebParser measure is used, e.g. URL=[SomeMeasure], then the value of the parent measure is used, generally by referring to a specific StringIndex number.ダウンロードおよび解析するサイトまたはファイルへのURL。たとえば、別のWebParserメジャーの名前が使用されている場合、一般的には特定のStringIndex番号を参照することによってURL=[SomeMeasure]メジャーの値が使用されます。

WebParser cannot use cookies or other session-based authentication, so it cannot be used to retrieve information from web sites requiring a login. However, Webparser can be used on sites which support HTTP authentication. E.g. http://myname:mypassword@somesite.com.WebParser Cookieや他のセッションベースの認証を使用できないため、ログインが必要なWebサイトから情報を取得するために使用することはできません。ただし、Webparser HTTP認証をサポートするサイトでは使用できます。例えばhttp://myname:mypassword@somesite.com

WebParser can read and parse local files on your computer by using the file:// URI scheme. E.g. URL=file://#CURRENTPATH#SomeFile.txt. Note that this must be a fully qualified path to the file.WebParserは、file:// URIスキームを使用して、コンピューター上のローカルファイルを読み取って解析することができます。例えば。これはファイルへの完全修飾パスでなければならないことに注意してください。URL=file://#CURRENTPATH#SomeFile.txt

If you want to use the current value of a measure in a dynamic way as a Section Variable, rather than as a reference to a "parent" WebParser measure, you must prefix the name of the measure with the & character.小節の現在値を動的に「親」WebParser小節への参照としてではなくセクション変数として使用したい場合は、小節の名前の前に&文字を付ける必要があります。

URL=http://SomeSite.com\[&WebMeasure]URL=http://SomeSite.com\[&WebMeasure]

RegExp

The Perl compatible regular expression used in parsing.Perl互換の正規表現構文解析に使用されます。

StringIndex

Defines which captured string from the RegExp this measure returns. This option is generally used in a child measure to determine which of the captured values in a parent measure to use.RegExpこのメジャーからどのキャプチャ文字列を返すかを定義します。このオプションは通常、数値データのどの取得値を使用するかを決定するために、数値データで使用されます。

Note: There is a limit of 99 StringIndex values allowed on a single WebParser measure.注意: 1つのWebParserメジャーで許可される99個のStringIndex値の制限があります。

StringIndex2

The second string index is used when using a RegExp in a measure that uses data from another WebParser measure (i.e. the URL points to a parent measure. In this case the StringIndex defines the index of the result of the parent measure's RegExp and the StringIndex2 defines the index of this measure's RegExp (i.e. it defines the string that the measure returns).使用したときに、第2の文字列のインデックスが使用されRegExp、別のWebParser尺度(すなわち、からのデータを使用する尺度でURLの点尺度。この場合、StringIndex親測定の結果の指標定義RegExpおよびStringIndex2定義この尺度の指数をRegExp(つまり、メジャーが返す文字列を定義します)。

More information on using StringIndex2 can be found here.StringIndex2の使用に関する詳細は、こちらにあります

Note: If the RegExp is not defined in this measure, the StringIndex2 has no effect.注:RegExpがこのメジャーで定義されていない場合、はStringIndex2効果がありません。

UpdateRate Default: 600UpdateRate デフォルト: 600

The rate in milliseconds determining how often the webpage is downloaded. This is relative to the config's main Update rate and any UpdateDivider on the measure. So the formula would be Update X UpdateDivider X UpdateRate = "how often the measure connects to the site".Webページがダウンロードされる頻度を決定するミリ秒単位の割合。これは、設定のメインの更新レート数値データのUpdateDividerに対する相対値です。したがって、式はUpdateX UpdateDividerX UpdateRate= "メジャーがサイトに接続する頻度"になります。

Notes: Some caution should be used in determining how often to connect to a site with WebParser. Excessively accessing a site can cause your computer to be seen as an "attack" and result in being blocked. The UpdateRate option defaults to 600 as a safety measure. This should not be changed unless there is some reason to connect more or less often to the site.注: WebParserを使用してサイトに接続する頻度を決定する際には注意が必要です。サイトに過度にアクセスすると、コンピュータが「攻撃」と見なされ、ブロックされる可能性があります。安全対策として、このUpdateRateオプションのデフォルトはになって600います。多かれ少なかれサイトに接続する何らかの理由がない限り、これは変更されるべきではありません。

In order to override the UpdateRate set on a WebParser measure, to have it connect to the site and download the data "right now", the !CommandMeasure bang must be used, with the name of the "parent" measure as the first parameter, and "Update" as the second.WebParserメジャーに設定されているUpdateRateを上書きして、サイトに接続してデータを「すぐに」ダウンロードするには、最初のパラメータとして「親」メジャーの名前を付けて!CommandMeasure bangを使用する必要があります。そして「更新」を2番目として。

LeftMouseUpAction=[!SetOption WebMeasure URL "http://SomeNewSite.com"][!CommandMeasure WebMeasure "Update"]

More information on how UpdateRate works, and how you can best control WebParser measures, is at WebParser: How UpdateRate Works.UpdateRate仕組み、およびWebParser対策を最適に制御する方法の詳細については、WebParser:UpdateRateの仕組みを参照してください

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

Automatically decodes HTML Character References. This will eliminate the need to use a Substitute statement to translate character references like &quot;, &amp;, &lt;, and &gt; to the actual character. Valid values are:HTML文字参照を自動的にデコードします。これは、使用する必要がなくなりますSubstituteように文字参照変換するために文を&quot;&amp;&lt;、および&gt;実際の文字にします。有効な値は以下のとおりです。

  • 0: Does nothing (default).0:何もしません(デフォルト)。
  • 1: Decodes both numeric character references and character entity references.1:数字文字参照と文字実体参照の両方をデコードします。
  • 2: Decodes only numeric character references.2:数字参照だけをデコードします。
  • 3: Decodes only character entity references.3:文字実体参照だけをデコードします。

Note: This option is used on the child measures actually returning the value of a StringIndex.注意:このオプションは、上で使用されている、実際にStringIndexの値を返すの措置。

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

Logs DEBUG messages to the Rainmeter log or to a file. Valid values are:DEBUGメッセージをRainmeter ログまたはファイルに記録します。有効な値は以下のとおりです。

  • 0: Does not log DEBUG messages from WebParser.0:WebParserからのDEBUGメッセージを記録しません。
  • 1: Logs DEBUG message to the log. Rainmeter must also be in Debug mode.1:DEBUGメッセージをログに記録します。Rainmeterもデバッグモードになっている必要があります。
  • 2: Saves the downloaded webpage to WebParserDump.txt in the current skin folder. This can be useful since some web servers send different information depending which client requests it. Remember to remove this from your config once you have it working correctly.2:ダウンロードしたWebページをWebParserDump.txt現在のスキンフォルダに保存します。Webサーバーによっては、どのクライアントが要求したかによって異なる情報を送信するため、これは便利です。正しく動作したら、忘れずに設定から削除してください。

Hint: Determining StringIndex values to use in a child measure can be done by setting Debug=1 on a measure having the RegExp option, which will display matched strings and StringIndex numbers in the Rainmeter logヒント:メジャーで使用するStringIndex値の決定は、Rainmeter ログで一致した文字列とStringIndex番号を表示するオプションを持つメジャーに設定することで実行できます。Debug=1RegExp

Debug2File

If the Debug option is set to 2, this option can be set to the path and name of the file to use for the downloaded webpage instead of WebParserDump.txt in the current skin folder.場合はDebugオプションに設定され2、このオプションは、ダウンロードしたWebページのための代わりに使用するファイルのパスと名前に設定することができWebParserDump.txt、現在のスキンのフォルダに。

Note: The folder for the file must already exist.注:ファイルのフォルダはすでに存在している必要があります。

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

If Download=1, the URL is downloaded to Window's TEMP folder and the name to the file is returned as string value. The measure can then be used with MeasureName on an Image meter to download images from a site and display them.の場合Download=1、はURLWindowのTEMPフォルダにダウンロードされ、ファイルの名前は文字列値として返されます。尺度は、その後に使用することができますMeasureName上の画像のサイトから画像をダウンロードして表示されるようにメーター。

Note: When used on a child measure, the download itself is treated as a parent function, and any FinishAction on the measure will be executed if the download succeeds, and any OnDownloadErrorAction on the measure will be executed if the download fails.注:上で使用した場合、子対策、ダウンロード自体は次のように扱われ、親機能、および任意のFinishActionダウンロードが成功した場合の測定には実行され、任意のOnDownloadErrorActionダウンロードが失敗した場合の測定には、実行されます。

DownloadFile

If the Download option is set to 1, this option defines a relative path and file name where the downloaded file will be saved instead of in Windows TEMP.

A folder DownloadFile will be created in the current folder, and the defined relative path and file name will be created under that. It is not possible to specify an absolute path.このDownloadオプションがに設定されている場合1、このオプションはダウンロードしたファイルがWindowsの代わりに保存される場所への相対パスとファイル名を定義しますTEMP

フォルダDownloadFile現在のフォルダ内に作成され、定義された相対パスとファイル名がその下に作成されます。絶対パスを指定することはできません。

Note: This file is not a temporary file so it is not deleted after unloading a skin or exiting Rainmeter.注意:このファイルはありません、それがされるように、一時ファイルではないスキンをアンロードするか、Rainmeterを終了した後に削除。

ErrorString

The value of the measure will be set to the string defined in this option if the RegExp results in a regular expression parsing error.RegExp正規表現の解析エラーが発生した場合、数値データの値はこのオプションで定義された文字列に設定されます。

Note: While there might be cases where this option is desirable, the OnRegExpErrorAction option might be a more flexible and robust way to deal with regular expression errors.注:このオプションが望ましい場合があるかもしれませんが、OnRegExpErrorActionオプションは、正規表現エラーを処理するためのより柔軟で堅牢な方法かもしれません。

LogSubstringErrorsDefault: 1LogSubstringErrorsデフォルト: 1

If set to "0", this will suppress logging of "Not enough substring" errors. This can be useful when for instance you are using lookahead assertions in a regular expression, and missing (captures) should not be treated as an "error"."0"に設定すると、 "Not enough substring"エラーのログ記録を抑制します。これは例えば、先読みアサーションを正規表現で使用していて、欠けている(キャプチャする)ことを「エラー」として扱うべきではない場合に役立ちます。

Note: This option is set on the parent WebParser measure.注:このオプションは、 WebParserメジャーに設定されています。

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

WebParser reads the resource only if it has been modified since last read. This can be overridden with ForceReload=1.WebParserは、最後の読み取り以降に変更された場合にのみリソースを読み取ります。これはで上書きすることができますForceReload=1

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

Specifies the code page of the downloaded URL=http:// web page or external file read with URL=file://.ダウンロードしたURL = http:// Webページまたは外部ファイルのコードページをURL = file://で指定します。

Most web sites on the web today are encoded with the Unicode UTF-8 standard. This is the default for WebParser, and it will seamlessly handle the site. No CodePage option is needed.今日のWeb上のほとんどのWebサイトは、Unicode UTF-8標準でエンコードされています。これはWebParserのデフォルトであり、サイトをシームレスに処理します。CodePageオプションは必要ありません。

However, there may be some older web sites that are encoded in a language / character set specific way. On a web site, the encoding used can generally be determined by viewing the raw HTML source and checking the "charset" meta value in the "head" section of the page. (i.e. meta charset="UTF-8")ただし、言語/文字セット固有の方法でエンコードされている古いWebサイトもあります。Webサイトでは、通常、生のHTMLソースを表示し、ページの「head」セクションにある「charset」メタ値を確認することによって、使用されるエンコーディングを決定できます。(すなわち、メタ文字セット= "UTF-8")

Some Examples are:例をいくつか示します。

  • CodePage=1200 : Unicode UTF-16 LE (Little Endian)CodePage=1200 :Unicode UTF-16 LE(リトルエンディアン)
  • CodePage=1251 : ANSI Cyrillic; Cyrillic (Windows)CodePage=1251ANSIキリル文字 キリル文字(Windows)
  • CodePage=1252 : ANSI Latin 1; Western European (Windows)CodePage=1252ANSI Latin 1 西ヨーロッパ(Windows)
  • CodePage=28605 : ISO 8859-15 Latin 9CodePage=28605 ISO 8859-15ラテン語9
  • CodePage=65001 : Unicode UTF-8CodePage=65001 :Unicode UTF-8

In addition, there are times when an external local file to be parsed with URL=file:// will be encoded in other than the ANSI (really ASCII plus "extended ASCII" specific to the locale of the computer) encoding used as the default in most Windows-based text editors. Primarily this will be in Unicode UFT-16 LE. In this case, the CodePage=1200 option must be used to tell WebParer how to interpret the resource being read.さらに、URL = file://で解析される外部ローカルファイルが、デフォルトとして使用されるANSI(実際にはASCIIとコンピュータのロケールに固有の「拡張ASCII」)エンコード以外でエンコードされることがあります。ほとんどのWindowsベースのテキストエディタで。主にこれはUnicodeのUFT-16 LEです。この場合、このCodePage=1200オプションを使用して、読み取られるリソースの解釈方法をWebParerに伝えなければなりません。

Codepage definitions and more information can be found at Windows code pages.コードページの定義と詳細情報は、Windowsのコードページにあります

Additional general help with Unicode encoding in Rainmeter can be found at Character Encoding in Rainmeter.RainmeterのUnicodeエンコーディングに関するその他の一般的なヘルプは、RainmeterのCharacter Encodingにあります。

ProxyServer Default: /autoProxyServer デフォルト: /auto

Proxy server to use with the measure. The following settings are valid:対策に使用するプロキシサーバー。以下の設定が有効です。

  • /auto
    This will use the proxy settings contained in the options for Internet Explorer. (default)/ auto
    これは、Internet Explorerのオプションに含まれているプロキシ設定を使用します。(デフォルト)
  • /none
    This will make a direct connection, and will not use any proxy setting./ none
    これは直接接続を確立し、プロキシ設定を使用しません。
  • ServerName:Port
    This will connect to the proxy server hostname or ip address and port defined. Port is often optional with proxy servers.ServerName:Port
    これは、定義されたプロキシサーバーのホスト名またはIPアドレスとポートに接続します。プロキシサーバーの場合、ポートは多くの場合オプションです。

This option can also be set in the Rainmeter.data file. If set there, it will be used as the global setting for all WebParser measures unless overridden in an individual measure(s).このオプションはRainmeter.dataファイルでも設定できます。ここに設定すると、個々の数値データで上書きされない限り、すべてのWebParser数値データのグローバル設定として使用されます。

The measure doesn't support any authentication, so only use proxy settings that do not require it.このメジャーは認証をサポートしていないため、認証を必要としないプロキシ設定のみを使用してください。

This setting is applied when the measure is initialized on skin load / refresh, and cannot be changed dynamically.この設定は、スキンの読み込み/更新時にメジャーが初期化されるときに適用され、動的に変更することはできません。

Examples: ProxyServer=/none, ProxyServer=192.168.1.1:8080, ProxyServer=ProxyHostname.net例: ProxyServer=/noneProxyServer=192.168.1.1:8080ProxyServer=ProxyHostname.net

UserAgent Default: Rainmeter WebParser pluginUserAgent デフォルト: Rainmeter WebParser plugin

Specifies a custom User Agent String to be sent when the parent WebParser measure connects to a remote resource using HTTP(S).親WebParserメジャーがHTTPを使用してリモートリソースに接続するときに送信されるカスタムユーザーエージェント文字列を指定します(S)。

If you want to find out what the User Agent String is for the browser you use, you can connect to WhatIsMyBrowser in your browser and copy the string it returns. Other common User Agent String values can be found at UserAgentString.使用しているブラウザのユーザエージェント文字列が何であるかを知りたい場合は、ブラウザでWhatIsMyBrowserに接続し、それが返す文字列をコピーします。他の一般的なユーザエージェント文字列値は、UserAgentStringにあります。

This option can also be set in the Rainmeter.data file. If set there, it will be used as the global setting for all WebParser measures unless overridden in an individual measure(s).このオプションはRainmeter.dataファイルでも設定できます。ここに設定すると、個々の数値データで上書きされない限り、すべてのWebParser数値データのグローバル設定として使用されます。

This setting is applied when the measure is initialized on skin load / refresh, and cannot be changed dynamically.この設定は、スキンの読み込み/更新時にメジャーが初期化されるときに適用され、動的に変更することはできません。

Specifies one or more custom HTTP Header Fields to be sent when the parent WebParser measure connects to a remote resource using HTTP(S).親WebParserメジャーがHTTPを使用してリモートリソースに接続するときに送信される1つ以上のカスタムHTTPヘッダーフィールドを指定します(S)。

Example: Header=Cache-Control: no-cache例: Header=Cache-Control: no-cache

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

These options are only valid on parent measures that connect to a site or file with URL, and / or have a RegExp or Download option. They are not valid on child measures.これらのオプションは、or オプションを使用してサイトまたはファイルに接続している、またはor オプションを持っているメジャーでのみ有効です。彼らは子供の措置には無効です。URLRegExpDownload

FinishAction

Bangs or other actions that are executed when the resource has been downloaded and the regular expression (PCRE) parsing is done.リソースがダウンロードされて正規表現(PCRE)の解析が行われたときに実行される前髪またはその他のアクション

Since WebParser is a "threaded" measure, and Rainmeter does not "wait" for it to return information from the resource, FinishAction can be used to ensure that things in the skin that are dependent on the values from the measure don't generate errors or undesirable visual displays while the WebParser measure hasn't finished getting and parsing the information, or that they are immediately updated as soon as WebParser is done.WebParserは「スレッド化された」メジャーであり、Rainmeterはリソースから情報を返すのを「待機」しないため、メジャーの値に依存するスキン内のものがエラーを生成しないようにするためにFinishActionを使用できます。または、WebParserメジャーが情報の取得と解析を完了していない間、またはWebParserが実行されるとすぐにそれらが即座に更新される間の、望ましくないビジュアル表示。

Note: FinishAction will be executed when the resource is connected to and the regular expression parsing is complete. It will be executed whether the parsing of the information by RegExp succeeds or fails. It will not be executed if the resource cannot be connected to, or if the regular expression parsing fails, AND an OnRegExpErrorAction option is set on the measure.注: FinishActionは、リソースが接続されて正規表現の解析が完了したときに実行されます。による情報の解析がRegExp成功したか失敗したかが実行されます。リソースに接続できない場合、または正規表現の解析に失敗した場合、OnRegExpErrorActionメジャーにオプションが設定されている場合は実行されません。

OnConnectErrorAction

Bangs or other actions that are executed if WebParser is unable to connect to the hostname or file resource in URL.WebParserがのホスト名またはファイルリソースに接続できない場合に実行される前髪またはその他のアクションURL

This might be due to network unavailability on the local computer, or network or server problems at the remote resource. In the case of the file:// protocol, this would be triggered by not finding the defined local file.これは、ローカルコンピュータでネットワークが利用できないこと、またはリモートリソースでネットワークまたはサーバーの問題が原因である可能性があります。file://プロトコルの場合、これは定義されたローカルファイルが見つからないことによって引き起こされます。

Note: It will take some time, perhaps as long as 10-20 seconds, for WebParser to "time out" and execute this action if the resource cannot be connected to over the network.注:リソースがネットワーク経由で接続できない場合、WebParserが「タイムアウト」してこのアクションを実行するには、おそらく10〜20秒程度の時間がかかります。

OnRegExpErrorAction

Bangs or other actions that are executed if the resource is connected to, but the regular expression defined in RegExp is unable to successfully parse the information. It will not be executed if the resource cannot be connected to.リソースが接続されているがで定義されている正規表現で情報が正常に解析されない場合に実行される前髪やその他のアクションRegExp。リソースに接続できない場合は実行されません。

This might be due to an incorrectly defined RegExp option, a change to a web site that causes the parsing to fail, or a remote server problem where the site is accessible, but the specific page defined on the URL can't be found or causes a redirect to an HTTP error condition.これは、誤って定義されたRegExpオプション、解析が失敗する原因となるWebサイトへの変更、またはそのサイトにアクセスできるがURLで定義された特定のページが見つからないか、原因となるリモートサーバーの問題が原因です。 HTTPエラー状態にリダイレクトします。

Note: If this option is defined and the parsing fails, FinishAction will not be executed.注:このオプションが定義されていて解析が失敗した場合は、FinishAction実行されません。

OnDownloadErrorAction

Bangs or other actions that are executed if a measure has a Download option set to 1, and the download of the resource fails.メジャーで[ ダウンロード ]オプションが1に設定されていて、リソースのダウンロードが失敗した場合に実行される前髪またはその他のアクション

This may be due to a missing file on the remote host, or the inability of Windows to save the file locally in either the Windows TEMP location or the location specified in a DownloadFile option.これは、リモートホストにファイルが見つからないこと、またはWindowsがファイルをWindowsのTEMPの場所またはDownloadFileオプションで指定された場所にローカルに保存できないことが原因である可能性があります。

The action will not be executed if the connection to or parsing of the resource in the parent URL option fails. It is executed if all else succeeds, but the specific download process fails. URLオプション内のリソースへの接続またはリソースの解析が失敗した場合、アクションは実行されません。他のすべてが成功した場合に実行されますが、特定のダウンロードプロセスは失敗します。

Note: When Download is used on a child measure, the download itself is treated as a parent function, and any FinishAction on the measure will be executed if the download succeeds, and any OnDownloadErrorAction on the measure will be executed if the download fails.注:場合はダウンロードが上で使用されている児童対策、ダウンロード自体は次のように扱われ、親機能、および任意のFinishActionダウンロードが成功した場合の測定には実行され、任意のOnDownloadErrorActionダウンロードが失敗した場合の測定には、実行されます。


Note: If some condition causes the error actions to be executed, care should be taken not to create an endless loop or cause the skin to repeatedly try to access a resource in a short period of time. For instance, it would not be wise to have these actions automatically update the measure they are on, or refresh the skin.注:何らかの条件によってエラーアクションが実行される場合は、無限ループを作成したり、スキンが短期間に繰り返しリソースにアクセスしようとしたりしないように注意する必要があります。たとえば、これらのアクションによって自動的にメジャーが更新されたり、スキンが更新されたりするのは賢明ではありません。

Measure Commands測定コマンド

Commands that can be sent to a parent WebParser measure using the !CommandMeasure bang.!CommandMeasure bang を使用して親WebParserメジャーに送信できるコマンド。

These are only valid with a target parent measure that connects to a site or file with URL, and / or has a RegExp option. They are not valid with a child measure as the target.これらは、ターゲットとの有効なを持つサイトやファイルに接続して測定URL、および/または持っているRegExpオプションを選択します。ターゲットとして子供のメジャーでは無効です。

Update

This will cause a WebParser parent measure to override any current UpdateRate setting, and immediately access and parse the resource defined in URL.これにより、WebParser親メジャーは現在のUpdateRate設定をオーバーライドし、で定義されたリソースに直ちにアクセスして解析しURLます。

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

More information on how UpdateRate works, and how you can best control WebParser measures, is at WebParser: How UpdateRate Works.UpdateRate仕組み、およびWebParser対策を最適に制御する方法の詳細については、WebParser:UpdateRateの仕組みを参照してください

Reset

This will cause a WebParser parent measure to reset all values for the parent and any related child measures to their initial empty values.これにより、WebParserの親メジャーは、親および関連する子メジャーのすべての値を初期の空の値にリセットします。

If a WebParser measure is able to connect and parse information from a web site or file, then that information is "remembered", and is only replaced when new information is successfully received on subsequent connections to the resource. This is both to allow a seamless transition from the old data to the new, and to allow a skin to continue displaying information if it is temporarily unable to connect or parse the resource.WebParserメジャーがWebサイトまたはファイルからの情報に接続して解析できる場合、その情報は「記憶」され、新しい情報がリソースへの後続の接続で正常に受信されたときにのみ置き換えられます。これは、古いデータから新しいデータへのシームレスな移行と、一時的にリソースに接続または解析できない場合にスキンが情報の表示を継続できるようにするための両方です。

Generally, the above behavior works best. However, this command might be used in conjunction with the OnConnectErrorAction and / or OnRegExpErrorAction actions if the skin design makes it desirable that WebParser "forget" old information when some error condition is triggered on subsequent connections to the resource.一般に、上記の動作は最もうまくいきます。ただし、その後のリソースへの接続時にエラー状態が発生したときにWebParserが古い情報を「忘れる」ことが望ましい場合は、このコマンドをOnConnectErrorActionまたはOnRegExpErrorActionアクション、あるいはその両方と組み合わせて使用することができます。

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

WebParser and Dynamic VariablesWebパーサーと動的変数

Dynamic variables can be used with the WebParser measure. There are some things specific to WebParser that should be kept in mind when doing things in a dynamic way in WebParser measures:動的変数はWebParserメジャーで使用できます。WebParserの測定で動的な方法で作業を行うときには、WebParserに固有の注意事項がいくつかあります。

WebParser uses UpdateRate to determine how often the measure should actually access the site or file. While you can dynamically change any option on a WebParser measure, the measure will not use the changes and access the site again until the next UpdateRate is reached. Just using !Update or !UpdateMeasure will NOT override the UpdateRate.WebParserはUpdateRateを使用して、メジャーが実際にサイトまたはファイルにアクセスする頻度を決定します。WebParserメジャーのオプションは動的に変更できますが、次のUpdateRateに達するまで、メジャーはその変更を使用せずにサイトに再度アクセスします。!Updateまたは!UpdateMeasureを使用しても、UpdateRateは上書きされません。

In order to have a dynamic change make WebParser parse the site "right now", you will use the !CommandMeasure bang with the "parent" WebParser measure as the first parameter, and "Update" as the second.動的に変更してWebParserがサイトを「今すぐ」解析するようにするには、最初のパラメータとして「親」WebParserメジャーを使用し、2番目のパラメータとして「Update」を使用して!CommandMeasure bangを使用します

LeftMouseUpAction=[!SetOption WebMeasure URL "http://SomeNewSite.com"][!CommandMeasure WebMeasure Update]

If you dynamically change an option on a "child" WebParser measure that depends on a "parent" measure, (like StringIndex for instance) you MUST use !CommandMeasure with "Update", targeting the "parent" WebParser measure. The values of child WebParser measures are a function of the parent measure, and are only updated when the parent is. You should never use !CommandMeasure on a "child" measure.(たとえばStringIndexのように)「親」メジャーに依存する「子」WebParserメジャーのオプションを動的に変更する場合は、「親」WebParserメジャーをターゲットにして、!Updateとともに!CommandMeasureを使用する必要があります。子WebParserメジャーの値は、親メジャーの関数であり、親がある場合にのみ更新されます。CommandMeasureを「子」メジャーに使用しないでください。

If you want to use the current value of a measure in a dynamic way as a Section Variable, rather than as a reference to a "parent" WebParser measure, you must prefix the name of the measure with the & character.小節の現在値を動的に「親」WebParser小節への参照としてではなくセクション変数として使用したい場合は、小節の名前の前に&文字を付ける必要があります。

URL=http://SomeSite.com\[&WebMeasure]URL=http://SomeSite.com\[&WebMeasure]

Examples

Retrieve the site title, first item and link from Slashdot's RSS feed.SlashdotのRSSフィードからサイトのタイトル、最初の項目、そしてリンクを取得します。

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,255

[MeasureRSSParent]
Measure=WebParser
URL=http://slashdot.org/slashdot.rdf
RegExp=(?siU)<title>(.*)</title>.*<item>.*<title>(.*)</title>.*<link>(.*)</link>

[MeasureRSSTitle]
Measure=WebParser
URL=[MeasureRSSParent]
StringIndex=1

[MeasureRSSItemTitle]
Measure=WebParser
URL=[MeasureRSSParent]
StringIndex=2

[MeasureRSSItemLink]
Measure=WebParser
URL=[MeasureRSSParent]
StringIndex=3

[MeterRSSTitle]
Meter=String
MeasureName=MeasureRSSTitle
FontSize=14
FontColor=222,255,227,255
StringStyle=Bold
AntiAlias=1

[MeterRSSItemTitle]
Meter=String
MeasureName=MeasureRSSItemTitle
Y=2R
FontSize=11
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
LeftMouseUpAction=["[MeasureRSSItemLink]"]
DynamicVariables=1

Retrieve, download and display the latest four submissions from the Rainmeter area on deviantART.deviantARTのRainmeterエリアから最新の4件の投稿を取得し、ダウンロードして表示します。

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

[Variables]
Item=.*<item>.*<title>(.*)</title>.*<link>(.*)</link>.*<pubDate>(.*)</pubDate>.*role="author".*>(.*)<.*<media:thumbnail url="(.*)"

[MeasureDA]
Measure=WebParser
URL=http://backend.deviantart.com/rss.xml?q=in%3Acustomization%2Fskins%2Fsysmonitor%2Frainmeter+sort%3Atime&type=deviation
RegExp=(?siU)#Item##Item##Item##Item#
UpdateRate=300

[MeasureTitle1]
Measure=WebParser
URL=[MeasureDA]
StringIndex=1

[MeasureLink1]
Measure=WebParser
URL=[MeasureDA]
StringIndex=2

[MeasurePubDate1]
Measure=WebParser
URL=[MeasureDA]
StringIndex=3

[MeasureAuthor1]
Measure=WebParser
URL=[MeasureDA]
StringIndex=4

[MeasureImage1]
Measure=WebParser
URL=[MeasureDA]
Download=1
StringIndex=5

[MeasureTitle2]
Measure=WebParser
URL=[MeasureDA]
StringIndex=6

[MeasureLink2]
Measure=WebParser
URL=[MeasureDA]
StringIndex=7

[MeasurePubDate2]
Measure=WebParser
URL=[MeasureDA]
StringIndex=8

[MeasureAuthor2]
Measure=WebParser
URL=[MeasureDA]
StringIndex=9

[MeasureImage2]
Measure=WebParser
URL=[MeasureDA]
Download=1
StringIndex=10

[MeasureTitle3]
Measure=WebParser
URL=[MeasureDA]
StringIndex=11

[MeasureLink3]
Measure=WebParser
URL=[MeasureDA]
StringIndex=12

[MeasurePubDate3]
Measure=WebParser
URL=[MeasureDA]
StringIndex=13

[MeasureAuthor3]
Measure=WebParser
URL=[MeasureDA]
StringIndex=14

[MeasureImage3]
Measure=WebParser
URL=[MeasureDA]
Download=1
StringIndex=15

[MeasureTitle4]
Measure=WebParser
URL=[MeasureDA]
StringIndex=16

[MeasureLink4]
Measure=WebParser
URL=[MeasureDA]
StringIndex=17

[MeasurePubDate4]
Measure=WebParser
URL=[MeasureDA]
StringIndex=18

[MeasureAuthor4]
Measure=WebParser
URL=[MeasureDA]
StringIndex=19

[MeasureImage4]
Measure=WebParser
URL=[MeasureDA]
Download=1
StringIndex=20

[MeterBackground]
Meter=Image
W=106
H=306
SolidColor=10,20,30,255
LeftMouseUpAction=["http://browse.deviantart.com/customization/skins/sysmonitor/rainmeter/?order=5"]

[MeterImage1]
Meter=Image
MeasureName=MeasureImage1
X=6
Y=17
W=95
H=50
PreserveAspectRatio=2
AntiAlias=1
ToolTipTitle=[MeasureTitle1]
ToolTipType=1
ToolTipText=[MeasureAuthor1]#CRLF#[MeasurePubDate1]
LeftMouseUpAction=["[MeasureLink1]"]
DynamicVariables=1

[MeterImage2]
Meter=Image
MeasureName=MeasureImage2
X=6
Y=91
W=95
H=50
PreserveAspectRatio=2
AntiAlias=1
ToolTipTitle=[MeasureTitle2]
ToolTipType=1
ToolTipText=[MeasureAuthor2]#CRLF#[MeasurePubDate2]
LeftMouseUpAction=["[MeasureLink2]"]
DynamicVariables=1

[MeterImage3]
Meter=Image
MeasureName=MeasureImage3
X=6
Y=165
W=95
H=50
PreserveAspectRatio=2
AntiAlias=1
ToolTipTitle=[MeasureTitle3]
ToolTipType=1
ToolTipText=[MeasureAuthor3]#CRLF#[MeasurePubDate3]
LeftMouseUpAction=["[MeasureLink3]"]
DynamicVariables=1

[MeterImage4]
Meter=Image
MeasureName=MeasureImage4
X=6
Y=239
W=95
H=50
PreserveAspectRatio=2
AntiAlias=1
ToolTipTitle=[MeasureTitle4]
ToolTipType=1
ToolTipText=[MeasureAuthor4]#CRLF#[MeasurePubDate4]
LeftMouseUpAction=["[MeasureLink4]"]
DynamicVariables=1

関連記事

スポンサーリンク

FeliCaアプリを作るときの準備

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

上に戻る