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)
-   -   How to create a keyboard shortcut to put a project On Hold (http://forums.omnigroup.com/showthread.php?t=29036)

jka33331 2013-04-08 11:14 AM

How to create a keyboard shortcut to put a project On Hold
 
Can anyone please help me out with this?

I'd like to be able to create a keyboard shortcut to put a project On Hold. I can't seem to figure out how to do this.

Has anyone had any luck with this?

Dale 2013-04-08 10:26 PM

I would consider writing/customizing an AppleScript to achieve this functionality. Start by looking at Curt Clifton's Project Template Placeholders script as a point of reference to select a single project from your OmniFocus document. From there you should be able to target the project status and change it to "On Hold".

[url]http://www.curtclifton.net/projects/[/url]

jka33331 2013-04-09 04:23 AM

Thanks, Dale. I read through the Project Template Placeholder on Curt's site but in all honesty, it's all a bit over my head. I wouldn't have the first clue on how to modify an Apple Script. Is there by any chance an easier solution?

Thanks for your time thus far. It's greatly appreciated.

Dale 2013-04-09 04:24 PM

1 Attachment(s)
[QUOTE=jka33331;122274]I wouldn't have the first clue on how to modify an Apple Script.[/QUOTE]

Warning: I am not an expert at AppleScript by any common measure.

I did use the beginning of Curt's script to target a single project in the OmniFocus document and added a single line to set the status to On Hold. I have attached the script for you.

I personally use [URL="http://www.alfredapp.com"]Alfred[/URL] to launch my scripts from the keyboard.

I hope this helps and/or gives you a direction in further creating a solution to your issue.

EDIT: Reattached AppleScript file

whpalmer4 2013-04-09 04:26 PM

[QUOTE=Dale;122306] I have attached the script for you.

[/QUOTE]
Are you sure about that? :-)

Dale 2013-04-09 04:32 PM

I had saved as .script opposed to .applescript and the uploader did not like it.

Fixed now. :)

RobTrew 2013-04-09 11:47 PM

You can also assign a keystroke (with something like FastScripts or KeyBoard Maestro) to a script which toggles [I]active[/I] ⇄ [I]on hold[/I].

[CODE]tell application id "OFOC"
tell front document
tell front document window
repeat with oPanel in {sidebar, content}
set refProj to (a reference to (value of selected trees of oPanel where class of its value is project))
set lstProj to refProj as list
if lstProj ≠ {} then exit repeat
end repeat
end tell
if lstProj = {} then return

-- Invert status of 1st selected project,
-- and apply inversion to all selected projects.
if (status of item 1 of lstProj) ≠ on hold then
set status of refProj to on hold
else
set status of refProj to active
end if

end tell
end tell[/CODE]

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

RobTrew 2013-04-10 05:42 AM

PS you shouldn't try this kind of thing with the current OF2 test alphas, which are liable to crash on it, as the sidebar scripting interface is not yet implemented.

jka33331 2013-04-10 05:56 AM

Dale,

Thank you so so much. This is so great. I am using the script via Launchbar and it works like a charm. I love this Omni community. You guys are helpful and awesome.

Thanks again!

jka33331 2013-04-10 06:23 AM

RobTrew,

Even better!!!! Yahoooo! I have this working on Keyboard Maestro now! Thanks guys!


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

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