Find Windows

Verb: findWindows

Finds open windows that match the defined criteria.

Syntax

findWindows [--useregex(Boolean)] [--title(String)] --regexPattern(String) [--regexOptions(DisplayableRegexOptions)] [--id(String)] [--classname(String)] [--processid(Numeric)] [--processname(String)] [--byparent(Boolean)] [--window(Window)] [--recursive(Boolean)] [--safesearch(Boolean)] [--styles(Nullable<AutomationWindowStyles>)] [--minimumheight(Numeric)] [--minimumwidth(Numeric)] (List<Window>)=value

Inputs

Script Designer Required AcceptedTypes Description
--useregex Use Regular Expression Optional Boolean When enabled, regular expression is used to find the windows.
--title Title Optional Text Title of the windows that should be found.
--regexPattern Regular Expression Only whenUse Regular Expression is True Text Regular expression used to identify the windows that should be found.
--regexOptions Options Optional DisplayableRegexOptions Options for regular expression matching:
  • Compiled
  • Culture Invariant
  • ECMA Script
  • Explicit Capture
  • Ignore Case
  • Ignore Pattern Whitespace
  • Multiline
  • Right To Left
  • Singleline
  • --titleAsRegex Title is regular expression(Obsolete) Optional Boolean When enabled, allows the use of a "Regular Expression" to search for the window title.
    This parameter is obsolete, the Use Regular Expression parameter should be used instead.
    --ignorecase Ignore case(Obsolete) Optional Boolean When enabled, specifies case-insensitive matching.
    This parameter is obsolete. To select regular expression options, use the Options instead.
    --dotmatchesnewline Dot matches new line(Obsolete) Optional Boolean When enabled, the dot (.) character matches every character, instead of every character except "\n".
    This parameter is obsolete. To select regular expression options, use the Options instead.
    --freespacing Ignore white space(Obsolete) Optional Boolean When enabled, eliminates blank spaces and breaks without adding a escape character.
    This parameter is obsolete. To select regular expression options, use the Options instead.
    --explicitcapture Explicit capture(Obsolete) Optional Boolean When enabled, specifies that the only valid captures are explicitly named or numbered groups of the form (? ).
    This parameter is obsolete. To select regular expression options, use the Options instead.
    --multiline Multiline(Obsolete) Optional Boolean When enabled, changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.
    This parameter is obsolete. To select regular expression options, use the Options instead.
    --id Identifier Optional Text Id of the windows that should be found.
    --classname Class Name Optional Text Class name of the windows that should be found.
    Use the recorder to obtain this information.
    --processid Process Id Optional Number Id of the process to which the windows belong.
    --processname Process Name Optional Text Name of the process to which the windows belong.
    --byparent Search in Attached Windows Optional Boolean When enabled, allows searching for child windows.
    --window Window Optional Window Main window of which the child windows should be found.
    --recursive Recursive Optional Boolean When enabled, allows finding windows within windows.
    --safesearch Safe Search Optional Boolean When enabled, a better performance window search algorithm is executed.
    --styles Styles Optional AutomationWindowStyles Styles of the windows that should be found.
    --minimumheight Minimum Height Optional Number Minimum height of the windows that should be found.
    --minimumwidth Minimum Width Optional Number Minimum width of the windows that should be found.

    Outputs

    Script Designer AcceptedTypes Description
    value Windows List<Window> Returns a list of the windows found.

    Example

    The Find Windows command finds the Notepad windows, and the Count Items command informs the number of windows found.

    defVar --name foundedWindows --type List --innertype Window
    defVar --name windowsQuantity --type Numeric
    launchWindow --executablepath "notepad.exe"
    launchWindow --executablepath "notepad.exe"
    findWindows --classname Notepad foundedWindows=value
    // Find open Notepad windows and store them in a list.
    count --collection "${foundedWindows}" windowsQuantity=value
    // Counts the number of windows found and displays the result in the console.
    logMessage --message "Windows Quantity: ${windowsQuantity}" --type "Info"
    

    See Also

  • Attach Window
  • Cancel Token Source
  • Clear Cache
  • Click
  • Click on Cell
  • Click on Menu
  • Click on Value
  • Close Window
  • Control Screenshot
  • Count Windows
  • Expand Tree
  • Find Window
  • Focus
  • Focus Window
  • Get Barcode
  • Get Bounds
  • Get Cell Value
  • Get Control
  • Get Image Grid
  • Get Interval
  • Get Options
  • Get Table
  • Get Table Information
  • Get Tree Nodes
  • Get Value
  • Handle Open File Dialog
  • Handle Save File Dialog
  • Launch and Attach Window
  • Launch or Attach Window
  • Map Image Grid
  • Maximize or Minimize Window
  • Offset Value
  • Screenshot Window
  • Select Row
  • Select Tab
  • Set Execution Throttling
  • Set Grid Value
  • Set Value
  • Update Window
  • Verify Enabled
  • Verify If Visible
  • Wait and Close Security Window
  • Wait Busy Window
  • Wait Control
  • Wait for Control to Enable
  • Wait for Window to Appear
  • Watch and Close Window