FindWindow の検索パス タグ

 

公開日: 2016年11月

対象: Dynamics 365 (online)、Dynamics 365 (on-premises)、Dynamics CRM 2013、Dynamics CRM 2015、Dynamics CRM 2016

<FindWindow> タグには、タグ内の一覧の順序で実行される照合要素の一覧があります。 このトピックでは、サンプル コードを使用して <FindWindow> 要素について説明します。

このトピックの内容

<FindWindow> 要素

サンプル コード

<FindWindow> 要素

次のコード スニペットは、<FindWindow> タグの要素を示しています

# RELAX NG XML grammar for FindWindow 
# http://relaxng.org/compact-tutorial-20030326.html 
Grammar
{ 
start = FindWindow FindWindow = element 
FindWindow
{ 
  element ControlId { attribute match { xsd:integer }?, text }*
& element Caption { attribute match { xsd:integer }?, text }*
& element CaptionStartsWith { same as Caption }*
& element CaptionEndsWith { same as Caption }*
& element CaptionContains { same as Caption }*
& element Class { attribute match { xsd:integer }?, text }*
& element ClassStartsWith { same as Class }*
& element ClassEndsWith { same as Class }*
& element ClassContains { same as Class }*
& element Position { xsd:integer, xsd:integer } *
& element Find { Caption & Class }*
& element Desktop { empty }*
& element Application { empty }*
& element Owner { empty }*
& element RelaxProcessIdRestriction { empty }*
& element RelaxThreadIdRestriction { empty }*
}
} 

次の表に、<FindWinow> の要素を説明します。

Element

説明

ControlId

ID 付きウィンドウ

Caption

ウィンドウ キャプションのテキスト。

CaptionStartsWith

キャプションがテキストで始まります

CaptionEndsWith

キャプションがテキストで終わります。

CaptionContains

キャプションにテキストが含まれます。

Class

クラス名を持つウィンドウ

ClassStartsWith

クラス名がテキストで始まります。

ClassEndsWith

クラス名がテキストで終わります。

ClassContains

クラスにテキストが含まれます。

Position

指定した場所でウィンドウを検索します。 この場所は、ウィンドウの左上隅に (x, y) 座標で定義されます。 この場所は、<Application/> (既定) または <Desktop/> のいずれかから計算されます。 <Desktop/> が使用される場合、<Position> 要素の前に指定する必要があります。

検索

Class 要素または Caption 要素で指定されたとおりにウィンドウを検索します。FindWindow の場合と同じ要素がここで使用されます (CaptionCaptionStartsWithCaptionEndsWithCaptionContainsClassClassStartsWithClassEndsWith、または ClassContains)。

Desktop

デスクトップに検索箇所を設定

Application

アプリケーションの最上位ウィンドウに検索箇所を設定します。

Owner

所有者が指定されているウィンドウ。

RelaxProcessIdRestriction

検索にさまざまなプロセス ID を持つウィンドウを含めます。 既定では、すべてのウィンドウが同じプロセス ID に属しています。

RelaxThreadIdRestriction

検索プロセスにさまざまなスレッド ID を持つウィンドウを含めます。 既定では、すべてのウィンドウが同じスレッド ID に属しています。

サンプル コード

次のサンプル セットは、さまざまな属性セットがどのように使用されるかを示しています。

The following sample searches for a window with the control ID 1003.
<FindWindow>
<ControlID>1003</ControlID>
</FindWindow>

The following sample searches for a window with the class name SunAWTFrame.
<FindWindow>
<Class>SunAWTFrame</Class>
</FindWindow>

The following sample searches for a window at desktop position x200 y400. 
<FindWindow>
<Desktop/>
<Position>200,400</Position>
</FindWindow>

The following sample searches for the second application with the caption CurrencyConv that is not within the same process as the DDA loaded application. 

<FindWindow>
<RelaxProcessIdRestriction/>
<Caption match="2">CurrencyConv</Caption>
</FindWindow>

関連項目

JavaDDA
データ駆動型アダプター (DDA) の使用

Unified Service Desk 2.0

© 2017 Microsoft. All rights reserved. 著作権