diff options
author | Teddy Wing | 2018-10-08 17:33:03 +0200 |
---|---|---|
committer | Teddy Wing | 2018-10-08 17:33:03 +0200 |
commit | f722251e725d6ed0ee8434ad2207a00d7f09c3a7 (patch) | |
tree | bfe5e37948aefda43c95a6eda788e17dbd8f530a /Word Count/AppDelegate.applescript | |
parent | 6e9372ca64d9d33195caae6a37b3ad778ab75ca7 (diff) | |
download | Word-Count-f722251e725d6ed0ee8434ad2207a00d7f09c3a7.tar.bz2 |
Add a label to display the filename of the document used
Provides a way to confirm that the word counter operated on the expected
document.
Diffstat (limited to 'Word Count/AppDelegate.applescript')
-rw-r--r-- | Word Count/AppDelegate.applescript | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Word Count/AppDelegate.applescript b/Word Count/AppDelegate.applescript index 38a3c2e..8cc0d1e 100644 --- a/Word Count/AppDelegate.applescript +++ b/Word Count/AppDelegate.applescript @@ -11,6 +11,7 @@ script AppDelegate -- IBOutlets property theWindow : missing value + property fileName : missing value property theCharacters : missing value property theWords : missing value property theParagraphs : missing value @@ -19,11 +20,13 @@ script AppDelegate tell application "TextEdit" set top_document to document 1 + set l_name to name of top_document set l_chars to count characters of top_document set l_words to count words of top_document set l_paragraphs to count paragraphs of top_document end tell + fileName's setStringValue_(l_name) theCharacters's setStringValue_(l_chars) theWords's setStringValue_(l_words) theParagraphs's setStringValue_(l_paragraphs) |