Skip to content

Instantly share code, notes, and snippets.

@FirePanther
Last active November 17, 2016 03:51
Show Gist options
  • Save FirePanther/e9eb83d3947465e8caa6 to your computer and use it in GitHub Desktop.
Save FirePanther/e9eb83d3947465e8caa6 to your computer and use it in GitHub Desktop.
Count Selected Characters and Words
on run {input, parameters}
set w to count words of (input as string)
set ws to "s"
if w = 1 then set ws to ""
set c to count characters of (input as string)
set cs to "s"
if c = 1 then set cs to ""
display dialog (c & " character" & cs & " (" & w & " word" & ws & ") in the selected text." as string) buttons {"Close"}
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment