Last active
March 20, 2016 20:03
-
-
Save helmuthauser/f97f77d2930cd8404687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helmut Hauser | |
# http://www.worksmartandberemarkable.com | |
# March 19, 2016 | |
# code from http://hints.macworld.com/article.php?story=20070730101510623 | |
# get the number of characters, word | |
set numCharacters to count (the clipboard) | |
set numWords to count words of (the clipboard) | |
set numParagraphs to count paragraphs of (the clipboard) | |
# send the numbers to the notification center | |
display notification "There are " & numCharacters & " characters" & return & "in " & numWords & " words in " & numParagraphs & " paragraphs" with title "Counting done:" | |
############################################## | |
# override the current clipboard with the current count | |
############################################## | |
# you can choose one of these options by removing the # | |
# just feed back number of characters | |
# set the clipboard to (numCharacters as text) & " characters" | |
# just feed back number of characters | |
set the clipboard to (numWords as text) & " words" | |
# feed back counts of characters and words | |
#set the clipboard to (numCharacters as text) & " characters in " & (numWords as text) & " words" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment