Skip to main content

Set Value

Sets the value property of a UI element using the ValuePattern interface.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Handle - The handle of the window containing the element.
  • Window Selector - The selector for identifying the target window.
  • Element Selector - The selector for identifying the target element.
  • Value - The value to set for the element.

How It Works

The Set Value node sets the value property of a UI element using the ValuePattern interface. When executed, the node:

  1. Uses the Window Selector and Element Selector to locate the target element
  2. Retrieves the ValuePattern of the element
  3. Sets the element's value property to the specified value

Requirements

  • The target element must support the ValuePattern interface
  • Both Window Selector and Element Selector are required to identify the target element

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Window Selector or Element Selector
  • Element not found
  • ValuePattern not supported by the element

Usage Notes

  • This node directly sets the value property of an element, which is different from sending keystrokes
  • It works with elements that have a value property, such as text boxes, combo boxes, and sliders
  • This approach is often more reliable than sending keystrokes as it bypasses keyboard input processing
  • The element must be enabled and visible to have its value set
  • This node replaces the current value of the element with the new value
  • For text input elements, this is typically equivalent to setting the text content