フィールド値の取得
入力した索引に従って、端末のフィールドのテキストを取得します。
コマンドの可用性: IBM RPA SaaS および IBM RPA オンプレミス
スクリプト構文
IBM RPA の専有スクリプト言語の構文は、他のプログラミング言語と似ています。 スクリプト構文は、スクリプト・ファイル内のコマンドの構文を定義します。 この構文は、 IBM RPA Studioの 「スクリプト」 モードで操作できます。
terminalGetField --index(Numeric) (String)=value
依存関係
「端末に接続」 (terminalConnect) コマンドを使用して端末に接続します。
入力パラメーター
以下の表は、このコマンドで使用可能な入力パラメーターのリストを示しています。 この表では、 IBM RPA Studioのスクリプト・モードで作業しているときのパラメーター名と、それに相当する Designer モードのラベルを確認できます。
| 「デザイナー」モードのラベル | 「スクリプト」モードの名前 | 必須 | 使用可能な変数タイプ | 説明 |
|---|---|---|---|---|
| 索引 | index |
Required |
Number |
テキストを取得するフィールドの索引。 |
出力パラメーター
| 「デザイナー」モードのラベル | 「スクリプト」モードの名前 | 使用可能な変数タイプ | 説明 |
|---|---|---|---|
| 値 | 値 | Text |
入力された Index に従って取得されたテキスト。 |
例
TN3720 端末エミュレーター上の索引フィールド「0」に含まれているテキストを取得します。
defVar --name success --type Boolean
defVar --name obtainedValue --type String
defVar --name terminalConnection --type Boolean
// Connecting to fandhezi terminal
terminalConnect --name terminal --hostname "example.com" --port 23 --timeout 00:01:00 terminalConnection=value
terminalSetField --index 0 --value "Hello World" success=value
// Get the value contained in index field "0".
terminalGetField --index 0 obtainedValue=value
logMessage --message "${obtainedValue}" --type "Info"
terminalDisconnect --name terminal