Skip to content

Instantly share code, notes, and snippets.

@martinwoodward
Created November 1, 2023 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinwoodward/db99dce61c6b2ffedd84ff03d64e5c96 to your computer and use it in GitHub Desktop.
Save martinwoodward/db99dce61c6b2ffedd84ff03d64e5c96 to your computer and use it in GitHub Desktop.
Keyboard Maestro Script to simulate typing of the clipboard buffer
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>687267520.59896398</real>
<key>Macros</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>813</integer>
<key>MacroActionType</key>
<string>SetVariableToText</string>
<key>Text</key>
<string>%SystemClipboard%</string>
<key>Variable</key>
<string>Source</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>814</integer>
<key>Actions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>815</integer>
<key>CaseEntries</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>Action</key>
<string>ByTyping</string>
<key>ActionUID</key>
<integer>816</integer>
<key>MacroActionType</key>
<string>InsertText</string>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
<key>Text</key>
<string>%Variable%Character%</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>817</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>RANDOM(1,2)</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
</array>
<key>ConditionType</key>
<string>Matches</string>
<key>TestValue</key>
<string>\n|\r</string>
</dict>
<dict>
<key>Actions</key>
<array>
<dict>
<key>Action</key>
<string>ByTyping</string>
<key>ActionUID</key>
<integer>818</integer>
<key>MacroActionType</key>
<string>InsertText</string>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
<key>Text</key>
<string>%Variable%Character%</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>819</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>RANDOM(0.05,0.1)</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
</array>
<key>ConditionType</key>
<string>Matches</string>
<key>TestValue</key>
<string>\s</string>
</dict>
<dict>
<key>Actions</key>
<array>
<dict>
<key>Action</key>
<string>ByTyping</string>
<key>ActionUID</key>
<integer>829</integer>
<key>MacroActionType</key>
<string>InsertText</string>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
<key>Text</key>
<string>%Variable%Character%</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>830</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>RANDOM(0,0.175)</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
</array>
<key>ConditionType</key>
<string>Otherwise</string>
<key>TestValue</key>
<string></string>
</dict>
</array>
<key>MacroActionType</key>
<string>Switch</string>
<key>Source</key>
<string>Variable</string>
<key>Variable</key>
<string>Character</string>
</dict>
</array>
<key>Collections</key>
<dict>
<key>CollectionList</key>
<array>
<dict>
<key>CollectionType</key>
<string>SubstringsIn</string>
<key>ResultType</key>
<string>String</string>
<key>Search</key>
<string>(?s).</string>
<key>SearchKind</key>
<string>Match</string>
<key>Source</key>
<string>Variable</string>
<key>Variable</key>
<string>Source</string>
</dict>
</array>
</dict>
<key>MacroActionType</key>
<string>For</string>
<key>TimeOutAbortsMacro</key>
<true/>
<key>Variable</key>
<string>Character</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>418</integer>
<key>IsActive</key>
<false/>
<key>MacroActionType</key>
<string>SetActionDelay</string>
<key>Permanent</key>
<false/>
<key>Preference</key>
<string>SimulateKeystrokeNormalKey</string>
<key>Reset</key>
<false/>
<key>Value</key>
<string>0.05</string>
</dict>
<dict>
<key>Action</key>
<string>ByTyping</string>
<key>ActionUID</key>
<integer>419</integer>
<key>IsActive</key>
<false/>
<key>MacroActionType</key>
<string>InsertText</string>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
<key>Text</key>
<string>%SystemClipboard%</string>
</dict>
</array>
<key>CreationDate</key>
<real>687270307.10672796</real>
<key>ModificationDate</key>
<real>689125491.76875603</real>
<key>Name</key>
<string>Type Clipboard</string>
<key>Triggers</key>
<array>
<dict>
<key>FireType</key>
<string>Pressed</string>
<key>KeyCode</key>
<integer>9</integer>
<key>MacroTriggerType</key>
<string>HotKey</string>
<key>Modifiers</key>
<integer>2816</integer>
</dict>
</array>
<key>UID</key>
<string>315421D6-C35C-416E-846F-00E9FC342BD8</string>
</dict>
</array>
<key>Name</key>
<string>Clipboards</string>
<key>ToggleMacroUID</key>
<string>BF9183D0-64D0-4379-9E36-7BB6252517EF</string>
<key>UID</key>
<string>BD6DD6B8-8226-4F4B-B0A5-54D40A96B4E2</string>
</dict>
</array>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment