The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   View a parent folder of a project (http://forums.omnigroup.com/showthread.php?t=23471)

human 2012-02-12 05:16 AM

View a parent folder of a project
 
I searched for a certain term and found a project that I don't know in which folder it is and I want to find out the name and place of that folder. How do I do that? I don't see any folder info in "inspect"...

RobTrew 2012-02-13 12:19 AM

Choosing 'Group by Folder' from the View Bar would be one option.

RobTrew 2012-02-13 12:39 AM

(and if you don't want to disturb the state of your view, and folder-tracking seems to be a regular issue, then you can always reach for the universal duct tape, and install a simple applescript button on your toolbar - sth like this):

[CODE]property pTitle : "Show folder path"
property pVer : "0.02"

tell application id "OFOC"
tell front document window of front document
repeat with oPanel in {content, sidebar}
set lstValue to value of (selected trees of oPanel where class of its value is project or class of its value is task)
if length of lstValue > 0 then exit repeat
end repeat
if length of lstValue < 1 then return
display dialog my FolderPath(first item of lstValue) buttons {"OK"} default button "OK" with title pTitle & " ver. " & pVer
end tell
end tell

on FolderPath(oNode)
set str to ""
tell application id "OFOC"
set oParent to container of (containing project of oNode)
repeat while class of oParent = folder
set str to name of oParent & ":" & str
set oParent to container of oParent
end repeat
end tell
return str
end FolderPath[/CODE]

human 2012-02-13 02:58 AM

RobTrew, thank you!

whpalmer4 2012-05-18 06:16 AM

I prefer a slight modification to Rob's script, which prints the name of the project as well. This allows one to run it with just an action selected and get the full name, useful in cases where you don't have the project name displayed.

[code]
property pTitle : "Show folder path"
property pVer : "0.03"

tell application id "OFOC"
tell front document window of front document
repeat with oPanel in {content, sidebar}
set lstValue to value of (selected trees of oPanel where class of its value is project or class of its value is task)
if length of lstValue > 0 then exit repeat
end repeat
if length of lstValue < 1 then return
display dialog my FolderPath(first item of lstValue) buttons {"OK"} default button "OK" with title pTitle & " ver. " & pVer
end tell
end tell

on FolderPath(oNode)
set str to ""
tell application id "OFOC"
set oParent to container of (containing project of oNode)
repeat while class of oParent = folder
set str to name of oParent & ":" & str
set oParent to container of oParent
end repeat
set str to str & name of (containing project of oNode)
end tell
return str
end FolderPath
[/code]

cberendes 2012-06-11 12:18 PM

Very helpful. I'd also vote for a context menu (control-click) item along the lines of "show parent" or "show containing".


All times are GMT -8. The time now is 07:36 AM.

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