Show / Hide Table of Contents

Method AutotextTriggerArgs.Replace2


Overload

Replaces the user-typed text with the specified text, keys, clipboard data, etc.

public void Replace2(params KKeysEtc[] keysEtc)
Parameters
keysEtc  (KKeysEtc[])

Arguments of these types:

  • string - keys. Key names separated by spaces or operators, like "Enter A Ctrl+A".
    Tool: in "" string press Ctrl+Space.
  • string with prefix "!" - literal text.
    Example: var p = "pass"; keys.send("!user", "Tab", "!" + p, "Enter");
  • string with prefix "%" - HTML to paste. Full or fragment.
  • clipboardData - clipboard data to paste.
  • KKey - a single key.
    Example: keys.send("Shift+", KKey.Left, "*3"); is the same as keys.send("Shift+Left*3");
  • int - sleep milliseconds. Max 10000.
    Example: keys.send("Left", 500, "Right");
  • System.Action - callback function.
    Example: Action click = () => mouse.click(); keys.send("Shift+", click);
  • KKeyScan - a single key, specified using scan code and/or virtual-key code and extended-key flag.
    Example: keys.send(new KKeyScan(0x3B, false)); //key F1
    Example: keys.send(new KKeyScan(KKey.Enter, true)); //numpad Enter
  • char - a single character. Like text with OKeyText.KeysOrChar or operator ^.

Remarks

Options for this function can be specified when adding triggers, in the flags parameter. Or before adding triggers, with AutotextTriggers.DefaultFlags. This function uses TAFlags.Confirm, TAFlags.DontErase, TAFlags.ShiftLeft, TAFlags.RemovePostfix.

If used flag TAFlags.Confirm, for label can be used first argument with prefix "!!"; else displays all string arguments.