Launch and Attach Window

Verb: launchWindow

Launches a window of a Windows application and attaches it with the current execution context.

Syntax

launchWindow --executablepath(String) [--parameters(String)] [--safesearch(Boolean)] [--timeout(TimeSpan)] (Window)=value (Numeric)=processId (Boolean)=success

Inputs

Script Designer Required AcceptedTypes Description
--executablepath Executable Required Text Path to the application that should be launched.
--parameters Parameters Optional Text Command line parameters used when launching the Executable.
--safesearch Safe search Optional Boolean When enabled, a higher performance search algorithm is executed.
--timeout Timeout Optional Time Span, Number, Text Command execution timeout.
In case no value is defined for the timeout parameter, the execution uses the context timeout defined by the Set Timeout command. If that command is not used on the script, the default timeout is 5 seconds.

Outputs

Script Designer AcceptedTypes Description
value Window Window Returns the launched window.
processId Process id Number Returns the process id of the launched window.
success Success Boolean Returns True to report process success, or False if otherwise.

Example

Launches a Notepad window and attaches it to the current execution context, returning variables with the opened window, the process id and the success of the execution.

defVar --name success --type Boolean
defVar --name startedWindow --type Window
defVar --name processId --type Numeric
launchWindow --executablepath "C:\\Windows\\notepad.exe" --timeout 00:00:20 processId=processId success=success startedWindow=value
logMessage --message "\r\n${success}\r\n${processId}" --type "Info"
// Opens a Notepad window and associates it with context.

Remarks

The window opened by Launch and Attach Window is automatically attached to the current execution context. Thus, if manipulation of another window is required immediately after executing this command, it must be attached to the context first.

The Executable parameter must contain the correct and complete path to the application executable.

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
  • Find Windows
  • 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 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