Announcement

Collapse
No announcement yet.

Event Type: Multiple Keystrokes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Event Type: Multiple Keystrokes

    It would be great if a message could generate a long string of text as if it came from the keyboard. ie: I press a key on a midi controller and "Hello world" appears in a specific/frontmost application (just like Key Combo and Key Code do now).

    Rob

  • #2
    Hi Rob,
    Thank you for this suggestion!

    Comment


    • #3
      Hi Rob,

      I recently discovered this is something you can do easily with AppleScript.
      In OSCulator, open the Parameters window and go to the AppleScript tab.
      Create a new script and write this code:

      Code:
      tell application "System Events"
          keystroke "abcdef"
      end tell

      You can even write code like this to ensure the application you want to send you keystrokes to is foremost:

      Code:
      tell application "TextEdit"
          activate
      end tell
      tell application "System Events"
          keystroke "abcdef"
      end tell

      Best,
      Cam

      Update: You need to create an empty document in TextEdit in order to test this code. If leave TextEdit with the initial Open dialog, this won't work.

      Comment

      Working...
      X