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)

Inastus 2010-12-21 12:43 PM

I found my error...I changed the Dropbox part but not the home part....Thanks for the quick response and help.

LazyTechGuy 2011-01-05 06:54 AM

[QUOTE=whpalmer4;89183]Yes. As I posted previously, change this line:

[code]
set projectsDir to (path to documents folder as text) & "Reference" & ":" -- Path to projects folder (change this as you like)
[/code]

to

[code]
set projectsDir to (path to home folder as text) & "Dropbox" & ":" -- Path to projects folder (change this as you like)
[/code]

and you should be set. You need to create the Projects folder in your Dropbox folder before running the script, and you'll need to create a folder for each project by running the Project Folder script on each one.[/QUOTE]

You guys ready for a really dumb question. I mean, this is one of those questions where once I know the answer, I'll have to kick myself for not knowing.

So I've read this thread, tried things on my own but I'm still stuck. I cannot get the two scripts (Folder and Notes) to point to a Dropbox folder. I can only successfully point it to my Documents folder and that's because I do nothing to alter the original script. I suspect it's the syntax I'm using when trying to add in my new file path.

So I'll show you what I'm doing.

Original:
[INDENT]set projectsFolderName to "Projects" -- name for main projects folder
set projectsPath to (path to documents folder as text) -- path to main projects folder[/INDENT]
I tried this:
[INDENT]set projectsFolderName to "OmniFocus Projects" -- name for main projects folder
set projectsPath to ~/Users/*myname*/Dropbox/Documents -- path to main projects folder[/INDENT]
... but this does not work. Nothing happens. So again, I think it's because it's the syntax I'm using to put the file path name in is not correct. I know nothing about Applescript so forgive me for being a dummy. So in it's simplest form: what am I doing wrong?

Thanks for your time.

RobTrew 2011-01-05 08:50 AM

~/Users/*myname*/Dropbox/Documents

doesn't work as a path because ~ is automatically expanded by the system to /Users/[username]

You need either:[INDENT]/Users/[username]/Dropbox/Documents[/INDENT]or the standard abbreviation:[INDENT]~/Dropbox/Documents[/INDENT]
[COLOR="White"]--[/COLOR]

LazyTechGuy 2011-01-05 09:18 AM

Hey thanks. So I tried that variation and I get the first dialog saying that the folder doesn't exist and would I like to create it, but then the script goes no further after I say yes. The folder is not created at all.

All I changed was the file path but now the script doesn't work at all?

teobaldo 2011-01-23 11:08 PM

[URL="http://forums.omnigroup.com/showpost.php?p=66207&postcount=22"]Druido[/URL] posted a modified version that creates a bookmark file in Finder, pointing to the OF project.

I found [URL="http://macscripter.net/viewtopic.php?id=26498"]code here[/URL] that can create a link in any RTF-capable application.
Does that include OO?

RobTrew 2011-01-24 03:10 AM

[QUOTE]I found [URL="http://macscripter.net/viewtopic.php?id=26498"]code here[/URL] that can create a link in any RTF-capable application.
Does that include OO?[/QUOTE]

There is a [URL="http://forums.omnigroup.com/showthread.php?t=3279"]discussion[/URL] of this, with code, in a thread on the OO forum.

[COLOR="White"]--[/COLOR]

Cypher 2011-01-30 04:28 AM

Great scripts which will be very useful to me, being a long term OmniFocus user I can't believe I haven't seen these until now :(

I downloaded the scripts directly from [url]http://jhh.med.virginia.edu/main/OmniFocusScripts[/url] earlier today so I should have the latest versions, although the page does say it was last edited two years ago.

I'm not familar with AppleScript so I initially implemented the two scripts using the default locations however I've still come across an issue.

The scripts appear to work at first. Clicking on the Project Folder script successfully creates the folders in the desired locations if they need to be created. Then clicking on the Project Notes script also causes the OmniOutliner Pro file to be correctly created if needed. Such as project1.oo3.

The problem I have found is that when I then select a different project in OF and click the Project Folder script it creates the folders ok if needed, but when I click on the project notes script, it complains it complains it can't find the project1.oo3 file even though it should be trying to create project2.

I've also had an issue where once the oo3 files is created and modified I do not have the option to save it, only to Save As.

Ideally I wanted my files stored in dropbox so if I happen to be using OF on the iPad I can still get to my project files via Dropbox's web interface etc. I may later change the scripts to work with plain text files or something so when I'm at work on a windows system I still have access to my notes. As a starting point I've now modified the standard OO scripts to work in Dropbox, so I now have my Project folders being correctly create in ~/Dropbox/Projects/ but obviously I still have the issue of being unable to create the note files correctly.

Any idea what the problem might be ?

Thanks

Phil

Cypher 2011-01-30 04:29 AM

As also mentioned by other posters above, I frequently move projects / tasks between sections in my OF structure. As an example I have folders for Today, This Week, Next Week etc and move project up the lists as I do my weekly, and daily reviews. I had planned to just manually move the project files in dropbox to mirror the changes I make in OF and also to have a COMPLETED folder to move project files to once I close them off in OF. Do you see any issues with this approach ?

Cypher 2011-01-30 05:34 AM

I've been looking through the Project Notes script trying to work out how it works and it appears that the variable "projNotesName" hasn't been set when it's first called by the script.

What I'm seeing is on first run projNotesName isn't being set prior to the point it tries to open the file and I'm guessing it tries to open a file with no name, it then correctly branches off to create the new file during which it sets the variable projNotesName prior to saving the file. On subsequent runs the script is remembering the value from when it was previously run, this causes it to look for project1.oo3 when it should be trying to find or create project2.oo3.

The bit I don't get is when it doesn't finding project1.oo3, in project2's folder structure, why it gives an error instead of trying to create the missing file, even if that meant doing so with the wrong name.

I'm guessing as you guys have it working that I must have downloaded an old version of these scripts, is their a newer link to the ones your running ?



{edit}
I've just downloaded the files linked to by blazercomp on page 4 of this thread. I ignored them at first as they said same as the source, but they are different and contain modifications by Nicola Vitacolonna, Sep 2009

Working a treat now :) Thanks

ssavanna 2011-06-16 10:19 PM

I don't have a "scripts" file anywhere. I only have an OmniFocus file in

home-- library--application support---omnifocus

I can't figure out how to get the icons into my toolbar. Any ideas?


All times are GMT -8. The time now is 11:18 PM.

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