Skip to content

Instantly share code, notes, and snippets.

@samflores
Created October 4, 2012 02:33
Show Gist options
  • Save samflores/3831150 to your computer and use it in GitHub Desktop.
Save samflores/3831150 to your computer and use it in GitHub Desktop.
tell application "System Preferences"
open
activate
end tell
# can be defined as uncicode data (U+D83D U+DE04) or the actual emoji character
set emojis to {¬
{":smile:", «data utxtD83DDE04» as Unicode text}, ¬
{":grim:", "😬"} ¬
}
tell application "System Events"
tell process "System Preferences"
click menu item "Language & Text" of menu "View" of menu bar 1
tell window "Language & Text"
click radio button "Text" of tab group 1
repeat with emoji in emojis
click button 1 of tab group 1
set the clipboard to item 2 of emoji
set theText to item 1 of emoji
keystroke theText
keystroke tab
keystroke "v" using {command down}
keystroke return
end repeat
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment