Skip to content

Select Text by Simulating a Drag

  1. Use command.moveCursorToText to enter Find Mode and move to the beginning of the target text.
  2. Trigger command.toggleDrag to start dragging.
  3. Use command.moveCursorToText again to move to the end of the target text.
  4. Trigger command.toggleDrag again to finish the drag.

You can also use command.dragToText directly instead of steps 3 and 4.

  1. Use Mouse Control Mode to move the cursor to the beginning of the text.
  2. Hold Tab to start dragging.
  3. Keep using Mouse Control Mode to move the cursor to the end of the text. You can also hold Command to constrain movement to the current element group.
  4. Release Tab to finish the drag.