Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'A word count action script for Quicksilver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A word count action script for Quicksilver
Authored by: mono toto on Feb 14, '07 07:00:02AM
I came up with my own rendition from this. Doesn't require Growl and uses quicksilver's display large type (similar to the 'get IP' script that comes bundled).

To try it, you could just copy the script from the comment, get into the text editing mode of QS, paste and then choose 'run as applescript' as the action.

tell application "System Events" to tell (item 1 of (processes whose frontmost = true))
keystroke "c" using command down
delay 0.5
set str to (the clipboard)
tell application "Quicksilver" to show large type " Characters: " & (count characters of str) & "
Words: " & (count words of str) & "
Paragraphs: " & (count paragraphs of str)
end tell

To use it more permanently, just save this into a .scpt, select some text in a document and then (with the text still selected) fire up QS and get it to run the script.

Does anyone know of a better way to grab the selected text other than using the clipboard? Any other critique would also be welcome.

[ Reply to This | # ]
import selected text into quicksilver for faster counting
Authored by: NHN on Feb 15, '07 01:20:01PM

Hi everybody,
I would also find it extremely useful to set up a trigger which allows me to paste a selected text (for example a paragraph within a website) directly into quicksilvers first pane (which would then automatically be turned into text mode), switch over to the second pane and just initiate the word count action. Have I missed anything or is this possibility not integrated into the standard quicksilver action catalogue?

[ Reply to This | # ]
A word count action script for Quicksilver
Authored by: thejoecarroll on Feb 21, '07 04:58:42AM

Nice script, monototo. You're approaching the task from a slightly different angle and your offering would certainly be more useful than mine in some situations. Personally, I prefer Growl Notifications to the big text thing in Quicksilver. Although Quicksilver has its own Growl command in Applescript, I found the formating was coming out all wrong so I interfaced directly with Growl.

The only alternative I can think of is Quicksilver's proxy object "Current Selection". It should work, but certain features/catalogs need to be activated and it would probably be a good idea to check/convert the selection if it is not a piece of text.

[ Reply to This | # ]
A word count action script for Quicksilver
Authored by: Adriana on Mar 06, '12 05:27:56PM
Is there any way to skip Quicksilver altogether and have a Growl Notification that uses count (the clipboard) as an AppleScript?

I donīt know anything about coding but I managed to make a Script that counts the characters and made a Keyboard trigger. But it brings the Dialog Window in the background and I need to go back and check.

tell current application
display dialog (return & (count (the clipboard)))
end tell

I constantly have to check character length and I need something that does not disrupts my work flow. Copying the text and using the script works fine, except for having to leave my current Application in order to check the pop-up Dialog.

Any help will be greatly appreciated.

[ Reply to This | # ]