The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Scripts to open project folders and notes files (http://forums.omnigroup.com/showthread.php?t=10863)

dwayneneckles 2009-05-28 08:42 AM

i created it, never mind thanks again for the scripts

RobTrew 2009-06-04 04:49 AM

Basing project notes on the default 003 template
 
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[/CODE]

RobTrew 2009-06-09 05:16 AM

[QUOTE=Rolandf;59523]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 ?[/QUOTE]

I have started a new thread which is partially in response to this question:

[URL="http://forums.omnigroup.com/showthread.php?p=60931#post60931"]http://forums.omnigroup.com/showthread.php?p=60931#post60931[/URL]

Chaz2010 2009-06-16 09:11 AM

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! :)

Chaz2010 2009-06-16 09:39 AM

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:[INDENT][COLOR="Blue"]set projectsFolderName to "Projects" -- name for main projects folder[/COLOR][/INDENT]

If I set the "Projects" value to something with a space in it, like:[INDENT][COLOR="Blue"]set projectsFolderName to "OmniFocus Projects" -- name for main projects folder[/COLOR][/INDENT]

It gets totally confused.

RobTrew 2009-06-17 02:13 PM

[QUOTE=Chaz2010;61299]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:[INDENT][COLOR="Blue"]set projectsFolderName to "Projects" -- name for main projects folder[/COLOR][/INDENT]

If I set the "Projects" value to something with a space in it, like:[INDENT][COLOR="Blue"]set projectsFolderName to "OmniFocus Projects" -- name for main projects folder[/COLOR][/INDENT]

It gets totally confused.[/QUOTE]


File and folder names which include spaces can be handled in Applescript with the "[URL="http://www.macosxhints.com/article.php?story=20080826233738852"]quoted form of POSIX path[/URL]" idiom.

RobTrew 2009-06-24 03:31 PM

In reponse to a query in [URL="http://forums.omnigroup.com/showpost.php?p=61603&postcount=1"]another post[/URL], I have drafted an edit to jharrison's excellent script for opening project folders.

The [URL="http://files.me.com/robinfrancistrew/nps4vy"]edited version[/URL] allows for the opening of context folders as well as project folders.

RT

RobTrew 2009-06-29 02:40 PM

[QUOTE=RobTrew;61697]In reponse to a query in [URL="http://forums.omnigroup.com/showpost.php?p=61603&postcount=1"]another post[/URL], I have drafted an edit to jharrison's excellent script for opening project folders.

The [URL="http://files.me.com/robinfrancistrew/nps4vy"]edited version[/URL] allows for the opening of context folders as well as project folders.[/QUOTE]

A [URL="http://files.me.com/robinfrancistrew/nps4vy"]further edit[/URL] will now open the project or context folder in [URL="http://db.tidbits.com/article/10380"]Cocoatech's Path Finder[/URL] 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
[/CODE]

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[/CODE]

curiousstranger 2009-08-17 02:01 PM

Problem with notes file
 
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?

RobTrew 2009-08-18 12:01 PM

[QUOTE=curiousstranger;64805]it doesn't appear that the open OO document and the oo3 file are the same object[/QUOTE]

What name / location is shown in the prompt if you choose File > Save As from the OO menu ?


All times are GMT -8. The time now is 07:14 PM.

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