View Single Post
Aha! It works perfectly, exactly as I had envisioned. Thank you three for your suggestions. All of your advice, put together, equals very happy.

It's actually pretty cool. It updates automatically, displays whatever actions are selected. Change the selection, and automatically, the pane updates. Here's a screenshot:

Click image for larger version

Name:	ss.jpg
Views:	1239
Size:	89.3 KB
ID:	1034

If you want to do this too, follow these steps:
1. Open ScriptEditor.
2. Paste this code into it.
Code:
(*
	This script works with GeekTool to display the currently selected actions in OmniFocus. This script is modified from a script originally designed to display the currently selected actions in Growl.
	
	version 0.2, by James A. Jones
	version 0.1, by Curt Clifton

	Copyright © 2009, James A. Jones
	Copyright © 2007-2008, Curtis Clifton
	
	All rights reserved.
	
	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
	
		• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
		
		• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
		
	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	
	version 0.2: GeekTool modification
	version 0.1: Original release
*)
set newline to ASCII character 10

property iconLoaningApplication : "OmniFocus.app"

tell application "OmniFocus"
	tell front document
		tell content of document window 1 -- (first document window whose index is 1)
			set theSelectedItems to name of every selected tree
			if ((count of theSelectedItems) < 1) then
				display alert "You must first select an item to work on." as warning
				return
			end if
		end tell
	end tell
end tell
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set theItemsText to theSelectedItems as text
set AppleScript's text item delimiters to oldDelim
set output to ""
repeat with selectedItem in theSelectedItems
	set output to output & selectedItem & newline
end repeat
output
3. Save the code to a file in your ~/Library/Scripts directory as GeekFocus.scpt or something like that.
4. Install GeekTool
5. In the preferences pane for GeekTool, drag the Shell window out to your desktop.
6. In the preferences window for the Shell window, in the Command field, specify "osascript ~/Library/Scripts/GeekFocus.scpt"
7. Change the update frequency to something reasonable that won't cause too much CPU overhead. I set it to 10 seconds. I changed the timeout to 5 seconds.
8. Change the dimensions, font size/color, and anything else to your hearts content.
9. Enjoy.

Last edited by fathom; 2009-08-25 at 10:59 PM..