The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Set location on Mac as with iPhone Thread Tools Search this Thread Display Modes
Is there any way to set a location in OmniFocus for the Mac in the same way as one does on the iPhone?

I create most of my actions on the Mac but use contexts with locations quite a lot. At the moment, I need to edit the action on my iPhone to assign a location using a map.

I have also emailed the ninjas adding my support for per action locations to OmniFocus on the iPhone and iPad per this thread. Of course, it would be great to see this on the Mac as well.
 
Quote:
Originally Posted by Steven Haines View Post
Is there any way to set a location in OmniFocus for the Mac
You can run an applescript which picks up the longitude and latitude of the current view in Google Earth, and applies them to the context(s) currently selected in OmniFocus.

Centre the Google Earth view on the target, select one or more OF contexts, and run a script like the following:

Code:
property pTitle : "Set location of selected OF contexts from Google Earth"
property pVer : "0.02"
property pMetersRadius : 1 -- edit the preferred radius of accuracy in kilometers here

tell application id "Erth"
	tell (GetViewInfo) to set {numLat, numLong} to {latitude, longitude}
end tell

tell application id "OFOC"
	set oDoc to front document
	tell front document window of oDoc
		set lstContexts to value of selected trees of sidebar
		if length of lstContexts < 1 or class of first item of lstContexts ≠ context then
			display dialog "Select one or more contexts before running this script" buttons {"OK"} with title pTitle
			return
		end if
	end tell
	
	set strName to text returned of (display dialog "latitude: " & (numLat as string) & return & 
		"longitude: " & (numLong as string) & return & return & 
		"Choose a name for this location:" default answer "" with title pTitle)
	
	repeat with oContext in lstContexts
		set location of oContext to {name:strName, latitude:numLat, longitude:numLong, radius:pMetersRadius}
	end repeat
	
	set lst to flattened contexts of oDoc where location is not missing value
end tell

Last edited by RobTrew; 2012-04-06 at 01:26 AM..
 
Rob

Thank you so much. I'll give it a try.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iphone Location Settings theblarney OmniFocus for iPhone 1 2009-11-19 01:20 PM
iPhone Location Services and Omnifocus 1.1 athenadesignuk OmniFocus for iPhone 10 2008-11-15 07:38 AM
Anyone else having problems with Location awareness on iphone 3g robotii OmniFocus for iPhone 2 2008-11-13 12:22 AM
Problems with Iphone OF 1.1 and location awareness LuckVIII@yahoo.com OmniFocus for iPhone 4 2008-11-06 09:54 PM
iPhone - set context location to 'all' msingleton OmniFocus for iPhone 0 2008-07-19 06:21 PM


All times are GMT -8. The time now is 05:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.