Skip to content

Instantly share code, notes, and snippets.

@lsloan
Created June 12, 2015 18:12
Show Gist options
  • Save lsloan/e26df26255b1ddfe6717 to your computer and use it in GitHub Desktop.
Save lsloan/e26df26255b1ddfe6717 to your computer and use it in GitHub Desktop.
When saved as an Automator workflow service in OS X, this Applescript will toggle the visibility of the character viewer palette. This is useful in older versions of OS X, which didn't provide easy access to special characters like emoji, etc. I bound this workflow to the Command-Option-Control-C key press for easy access.
on isRunning(applicationName)
tell application "System Events"
set appNameIsRunning to exists ¬
(processes where name is applicationName)
end tell
return appNameIsRunning
end isRunning
on run {input, parameters}
if isRunning("CharacterPalette") then
tell application "CharacterPalette" to quit
else
-- tell application "CharacterPalette" to activate
tell application "Finder" to open item "System:Library:Input Methods:CharacterPalette.app" of the startup disk
end if
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment