Text action reference
This section describes the Text action object. This type of
action is used for typing text into the foreground application.
It differs from the Key action in that Text is used for
typing literal text, while Key actions emulate pressing keys on
the keyboard. An example of this is that the arrow-keys are not part of a
text and so cannot be typed using the Text action, but can be
sent by the Key action.
Text class
-
class dragonfly.actions.action_text.Text(spec=None, static=False, pause=0.02, autofmt=False)
Action that sends keyboard events to type text.
- Arguments:
- spec – the text to type.
- static – if True, do not dynamically interpret spec
when executing this action.
- pause – the time to pause between each keystroke, given
in seconds.
- autofmt – if True, attempt to format the text with correct
spacing and capitalization. This is done by first mimicking
a word recognition and then analyzing its spacing and
capitalization and applying the same formatting to the text.