A hotkey to bring me to my perspectives from anywhere on my Mac

Call me lazy, but it would cool to hit something like Command-Option-I to jump right to my Inbox, Forecast, etc. no matter what program I’m using. Is there a script out there? Thanks!

Keyboard Maestro to the rescue.

Hi ediventurin,

Thing is, I just started using Launchbar and it’s quite amazing!. I think there’s a way to import Keyboard Maestro actions into it. I actually have some free time to play, so I’ll see what I can accomplish…

I use a script that creates a .webloc file for every OmniFocus perspective using “omnifocus:///perspective/…” URLs. I have these in a special folder “OmniFocus Perspectives” that I access via LaunchBar.

Here’s the script. You might need to adjust the destination folder by editing the property at the top of script:

property DestinationFolder : (path to home folder as string) & "Library:Application Support:LaunchBar:Omnifocus Perspectives"

on run
	tell application id "com.apple.finder"
		delete every item of folder DestinationFolder
	end tell
	tell application "OmniFocus"
		set ListOfPerspectives to perspective names -- get a list of OmniFocus' perspectives
	end tell
	repeat with MyPerspective in ListOfPerspectives
		if MyPerspective ≠ missing value then
			set theurl to "omnifocus:///perspective/" & urlencode(MyPerspective)
			tell application id "com.apple.finder"
				set webloc to make new internet location file to theurl at DestinationFolder with properties {name:"OF " & MyPerspective}
			end tell
		end if
	end repeat
end run

on urlencode(theText) -- source: http://discussions.apple.com/thread.jspa?messageID=9801376
	do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of theText
end urlencode

Alright - so far I’ve found this:

It works! I still have to tinker with some of the Perspective names, but I’m stoked!

1 Like