InputText plugin InputTextプラグイン

Plugin=InputText executes bangs with user input.Plugin=InputText ユーザー入力で前髪を実行します。

InputText works by defining a series of commands, which can be triggered by any "action" string (this includes mouse actions, conditional actions in a Calc measure, and other commands in an InputText measure, including the same measure). When triggered, a free-floating text input box is created to gather user input at the specified points in the command series. When all input has been submitted, the commands are carried out.InputTextは、一連のコマンドを定義することによって機能します。これは、任意の「アクション」文字列(これには、マウスアクション、Calcメジャーの条件付きアクション、および同じメジャーを含むInputTextメジャーの他のコマンドが含まれます)。トリガーされると、コマンドシリーズの指定されたポイントにユーザー入力を集めるために、自由浮動テキスト入力ボックスが作成されます。すべての入力が送信されると、コマンドが実行されます。

Additional help and examples for InputText can be found on the Rainmeter forums at Working with InputText.InputTextに関するその他のヘルプや例は、RainmeterフォーラムのWorking with InputTextにあります。

Note: InputText is incompatible with skins set to Stay Topmost, or AlwaysOnTop=2, as the conflict between the input field, which requires "focus", and the constant attempts by the skin to stay on "top", in front of the input field, will not allow InputText to function correctly.注意: InputTextは、最上位に設定されているスキンと互換性がありません。つまりAlwaysOnTop=2、フォーカスが必要な入力フィールドと、入力フィールドの前でスキンが常に最上位に留まるようにすることとの間の競合です。 InputTextを正しく機能させないでください。

Optionsオプション

Command1, Command2, ..., CommandNCommand1Command2、...、CommandN

Actions to execute when the plugin is triggered. The macro string $UserInput$ will be replaced by whatever the user types into it.プラグインがトリガーされたときに実行されるアクション。マクロ文字列$UserInput$は、ユーザーが入力したものに置き換えられます。

Command1=[!SetVariable SomeVar "$UserInput$"]

If the macro string $UserInput$ is repeated in a command series, multiple input boxes will be created in sequence. However, a single value input by the user can be used multiple times in different bangs in the same command series by using the string value of the InputText [MeasureName] as a section variable.マクロ文字列$UserInput$がコマンドシリーズで繰り返されると、複数の入力ボックスが順番に作成されます。ただし、ユーザーが入力した単一の値は、InputText [MeasureName]の文字列値をセクション変数として使用することにより、同じコマンドシリーズの異なるbangで複数回使用できます

Command1=[!WriteKeyValue Variables SomeVar "$UserInput$"]
Command2=[!SetVariable SomeVar "[MeasureName]"]

In addition, a command can override the values of options in this measure when an option="value" pair is added as a parameter to a Command option.さらに、option = "value"のペアがパラメーターとしてCommandオプションに追加されている場合、コマンドはこのメジャーのオプションの値をオーバーライドできます。

Command1=[!SetVariable SomeVar "[MeasureName]"] FontColor="255,0,0,255"

Note: The macro string $UserInput$ and the section variable [MeasureName] must be enclosed in quotes in the Command option if the user input may contain spaces.注:ユーザー入力にスペースが含まれる可能性がある場合は、マクロ文字列$UserInput$とセクション変数[MeasureName]をCommandオプションで引用符で囲む必要があります。

DefaultValue

Default text that will appear in the input box.入力ボックスに表示されるデフォルトのテキスト。

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

If set to 1, the input will be displayed as asterisks.に設定する1と、入力はアスタリスクとして表示されます。

InputLimit Default: 0 unlimitedInputLimit デフォルト:0 無制限

If defined, this will limit the number of characters allowed in the input field. Note that if a new line is entered with CTRL-Enter, this will be two characters, /r/n, toward the limit.定義されている場合、これは入力フィールドで許容される文字数を制限します。で新しい行を入力した場合は、上限に向かってCTRL-Enter2文字/r/nになります。

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

If set to 1, only numeric input will be allowed. A single - can be the first character, and a single . can be at any position in the input.に設定すると1、数値入力のみが許可されます。単一-文字は最初の文字にする.ことができ、単一文字は入力内の任意の位置に置くことができます。

X, YXY

Position of the input box.入力ボックスの位置

Note: Relative positioning with "r" and "R" is not supported.注: "r"と "R"の相対位置はサポートされていません。

W, HWH

Size of the input box.入力ボックスのサイズ

Note: H should be large enough to accommodate the font.注: Hフォントを収容するのに十分な大きさにする必要があります。

SolidColor Default: 255,255,255,255SolidColor デフォルト: 255,255,255,255

Color of the input field background.入力フィールドの背景

Note: The alpha channel changes the opacity of the entire input box including the text, not just the background.注意:アルファチャンネルは、背景だけでなく、テキストを含む入力ボックス全体の不透明度を変更します。

FontColor Default: 0,0,0FontColor デフォルト: 0,0,0

Color of the input text.入力テキストの

Note: Any alpha channel setting of FontColor is entirely ignored. The transparency of the input control is set by SolidColor, which will effect both the input box and text transparency.注意: FontColorのアルファチャンネル設定はすべて無視されます。入力コントロールの透明度はで設定されSolidColor、入力ボックスとテキストの透明度の両方に影響します。

FontFace

Family name of the input text font.入力テキストフォントの姓。

Note: Only fonts actually installed in Windows can be used.注: Windowsに実際にインストールされているフォントのみを使用できます。

FontSize

Size of the input text font.入力テキストフォントのサイズ

StringStyle

Style of the input text. Valid values are Normal, Bold, Italic, and BoldItalic.入力テキストのスタイル 有効な値はNormalBoldItalic、とBoldItalic

StringAlign Default: LeftStringAlign デフォルト: Left

Alignment of the input text. Valid values are Left, Right, Center.入力テキストの配置 有効な値はLeftRightCenter

Note: With right-aligned text, the cursor will move from left to right as text is typed. This is advised for skins using languages such as Arabic, which read right-to-left.注:右寄せのテキストでは、テキストが入力されるとカーソルは左から右に移動します。これは、右から左に読むアラビア語などの言語を使用しているスキンにお勧めします。

TopMost

Sets the Z-position of the input field. If set to 1 then the input field will stay on top of all windows while active. If set to 0 then other windows can be dragged in front of the input field while it is active. If not set at all (default) then the Z-position of the input field will follow the TopMost setting of the overall skin.入力フィールドのZ位置を設定します。に設定する1と、入力フィールドはアクティブな間、すべてのウィンドウの上に表示されたままになります。に設定すると0、他のウィンドウはアクティブな間に入力フィールドの前にドラッグできます。まったく設定されていない場合(デフォルト)、入力フィールドのZ位置はスキン全体のTopMost設定に従います。

Note: This option should not be used when FocusDismiss=1 is set.注:FocusDismiss=1が設定されている場合は、このオプションを使用しないでください。

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

If set to 1 (default), clicking anywhere other than on the input field will dismiss the input without taking action. If set to 0, the mouse is disabled until Enter or Escape is pressed.1(デフォルト)に設定されている場合、入力フィールド以外の場所をクリックすると、アクションを実行せずに入力が消えます。に設定する0と、EnterキーまたはEscapeキーを押すまでマウスは無効になります。

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

A bang or action that is executed when an active InputText field is dismissed without hitting Enter to execute the plugin commands.強打またはアクションアクティブのinputTextフィールドは、プラグインのコマンドを実行するには、Enter押すことなく却下されたときに実行されます。

Bangs前髪

LeftMouseUpAction=[!CommandMeasure MeasureInputText "ExecuteBatch ALL"]
IfAboveAction=[!CommandMeasure MeasureInputText "ExecuteBatch 3"]
OnRefreshAction=[!CommandMeasure MeasureInputText "ExecuteBatch 1-4"]

The ExecuteBatch parameter supports the following syntax: "ExecuteBatch All / # / #-#"このExecuteBatchパラメーターは次の構文をサポートします。"ExecuteBatch All / # / #-#"

  • All : All commands in the measureAll:メジャー内のすべてのコマンド
  • # : Only a single command in the measure:メジャー内の単一のコマンドのみ
  • #-# : A specific range of commands in the measure# - #:メジャー内の特定の範囲のコマンド

Example

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
FirstVar=!WriteKeyValue
SecondVar=!SetVariable
FontSize=14

[MeterBackground]
Meter=Image
SolidColor=1E3A69FF
W=250
H=105

[MeasureInput]
Measure=Plugin
Plugin=InputText
SolidColor=76A0E8FF
FontColor=255,255,255,255
FontFace=Seqoe UI
StringStyle=Italic
FontSize=#FontSize#
X=5
Y=5
H=25
W=240
DefaultValue="Change Me!"
Command1=!WriteKeyValue Variables FirstVar "$UserInput$" "#CURRENTPATH#InputText.inc"
Command2=!Refresh #CURRENTCONFIG#
Command3=!SetVariable SecondVar "$UserInput$" Y=40 DefaultValue="Change Me Too!"
Command4=["$UserInput$"] Y=75 DefaultValue="Text file path and name"

[MeterWriteKeyValue]
Meter=String
X=5
Y=5
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
Text=#FirstVar#
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 1-2"

[MeterSetVariable]
Meter=String
X=5
Y=10R
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
DynamicVariables=1
Text=#SecondVar#
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 3"

[MeterOpenEditor]
Meter=String
X=5
Y=10R
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
DynamicVariables=1
Text=Open Text File
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 4"

関連記事

スポンサーリンク

Zend_DBのSELECTメソッドのまとめ

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

上に戻る