Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description: This command is used to clear the content of a desktop element defined by a Sikuli Desktop locator or by using the focused element on screen. Offset X and Y fields can be used in cases where the element appearance is different every time which could make the Sikuli Desktop locator point to a different place. In such cases, an element that does not change (such as a label) can be used as an anchor and the offset points added so that the label is found and the direction is shifted from the label to this text box.

...

Usage Scenario (2): Suppose we want to clear the Run text box on Windows (WIN +R) but it does not always show the same content, so defining a Sikuli Desktop locator may not find the correct element. In such case, we can use Desktop_Clear command to use a static object that does not change place (such as Open: label) and use Offset fields to move from this static object to the text box.

...

Procedure: Define a step that opens Run using Desktop_Hotkeys (Win + R). Then define a step that uses Desktop_Clear command. In the Reference Point, define a Sikili Desktop locator for Open: label. Afterwards, you can specify the Offset where X controls horizonal scope and Y controls vertical scope. Let’s use 60 horizontal offset points. Your steps will look like this:

...