How to use the ahk.utils.escape_sequence_replace function in ahk

To help you get started, we’ve selected a few ahk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spyoungtech / ahk / ahk / window.py View on Github external
def send(self, keys, delay=None, raw=False, blocking=False, escape=False):
        """
        Send keystrokes directly to the window.
        Uses ControlSend
        https://autohotkey.com/docs/commands/Send.htm
        """
        if escape:
            keys = escape_sequence_replace(keys)
        script = self._render_template('window/win_send.ahk', keys=keys, raw=raw, delay=delay, blocking=blocking)
        return self.engine.run_script(script, blocking=blocking)
github spyoungtech / ahk / ahk / keyboard.py View on Github external
def type(self, s):
        """
        Sends keystrokes using send_input, also escaping the string for use in AHK.
        """
        s = escape_sequence_replace(s)
        self.send_input(s)