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 Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Scripts to open project folders and notes files Thread Tools Search this Thread Display Modes
i created it, never mind thanks again for the scripts
 
A quick comment on these excellent scripts:

When applescripting OO3, using the idiom:

"make new document"

has the disadvantage that it bypasses the default template, serving up a raw "factory settings" OO3 file.

If you wanted to create a new file based on the default (or some other) template you could adopt the idiom illustrated by the following snippet, which I have extracted from a current project:
Code:
tell application "OmniOutliner Professional"
	activate
	tell application "Finder"
		set strTemplate to alias ((path to application support from user domain as string) & "OmniOutliner 3:Templates:" & "Default.oo3template")
	end tell
	
	if (exists strTemplate) then
		open strTemplate
		set oTmpDoc to front document
	else
		set oTmpDoc to make new document
	end if
	set strTempPath to strDocsPath & strFileName
	save oTmpDoc in strTempPath
	close oTmpDoc
end tell
 
Quote:
Originally Posted by Rolandf View Post
Thank you very much for that script it's very useful.

Would it be possible to do the same to create groups and notes in DEVONThink ?
I have started a new thread which is partially in response to this question:

http://forums.omnigroup.com/showthre...0931#post60931
 
Thank you for these scripts. They are allowing me to stay work within OF for the things that need to be done there, while synchronizing my OF project info with the detail afforded by OO. Now, if only the OmniGroup would come out with OO for the iPhone! :)
 
I've found a slight bug in the scripts, and not being familiar with Applescript, I'm not sure how to fix this.

For the line:
set projectsFolderName to "Projects" -- name for main projects folder

If I set the "Projects" value to something with a space in it, like:
set projectsFolderName to "OmniFocus Projects" -- name for main projects folder

It gets totally confused.
 
Quote:
Originally Posted by Chaz2010 View Post
I've found a slight bug in the scripts, and not being familiar with Applescript, I'm not sure how to fix this.

For the line:
set projectsFolderName to "Projects" -- name for main projects folder

If I set the "Projects" value to something with a space in it, like:
set projectsFolderName to "OmniFocus Projects" -- name for main projects folder

It gets totally confused.

File and folder names which include spaces can be handled in Applescript with the "quoted form of POSIX path" idiom.
 
In reponse to a query in another post, I have drafted an edit to jharrison's excellent script for opening project folders.

The edited version allows for the opening of context folders as well as project folders.

RT

Last edited by RobTrew; 2009-06-25 at 12:18 AM..
 
Quote:
Originally Posted by RobTrew View Post
In reponse to a query in another post, I have drafted an edit to jharrison's excellent script for opening project folders.

The edited version allows for the opening of context folders as well as project folders.
A further edit will now open the project or context folder in Cocoatech's Path Finder if it is running on your system (defaulting otherwise to the OS X Finder).

The amended code is simply:
Code:
if application id "com.cocoatech.PathFinder" is running then
	tell application id "com.cocoatech.PathFinder"
		open aliasFolder
		activate
	end tell
else
	tell application id "com.apple.finder"
		open aliasFolder
		activate
	end tell
end if
This opens a new Path Finder window.
You may prefer to select the Project/Context folder in the existing front window of Path Finder:

Code:
tell application id "com.cocoatech.PathFinder"
	select aliasFolder
	activate
end tell

Last edited by RobTrew; 2009-06-29 at 11:30 PM..
 
I'm having a problem with the Open Project Notes script. When I fire up the script on a project that doesn't have a notes file, it prompts me, opens a new OO document and creates an oo3 file in the project folder. However, it doesn't appear that the open OO document and the oo3 file are the same object. If I hit command-s to save the OO document, I don't get any errors, but it doesn't appear to actually be saving anywhere to disk. When I close the OO document, it asks me if I want to save the changes. If I do, it ends up saving the file in my home directory, rather than the project folder, which contains a blank oo3 file. Any idea what might be going on here?

Last edited by curiousstranger; 2009-08-17 at 02:24 PM..
 
Quote:
Originally Posted by curiousstranger View Post
it doesn't appear that the open OO document and the oo3 file are the same object
What name / location is shown in the prompt if you choose File > Save As from the OO menu ?
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How best to organise files and folders? philrob Omni Lounge 4 2012-06-25 05:21 PM
Will OmniPlan for iPad open Microsoft Project files? amarsh OmniPlan for iPad 2 2012-06-07 10:41 AM
Open Folder / Notes Scripts broken in Lion Full Screen Mode nunez OmniFocus 1 for Mac 3 2011-10-06 02:42 PM
Slow to Open OF and Open the Settings [fixed by reducing zip files] GreenLorax OmniFocus for iPhone 26 2009-07-26 01:38 PM
Scripts that add simple tags to the end of notes... a11en OmniFocus Extras 9 2008-08-29 08:50 PM


All times are GMT -8. The time now is 05:25 AM.


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