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

 
Looking for script for moving actions to top of project Thread Tools Search this Thread Display Modes
Would it be possible to adapt this script so that it moved selected projects to the top of the project list? If so, how?

KS
 
Quote:
Originally Posted by kingsinger View Post
.. move selected projects to the top of the project list
Might look something like this:

Code:
property pTitle : "Move selected projects to top"
property pVer : "0.3"

tell application id "OFOC"
	tell front document
		-- GET A LIST OF THE PROJECTS SELECTED IN THE GUI
		tell front document window
			repeat with oPanel in {sidebar, content}
				set lstSeldProj to (value of selected trees of oPanel where class of its value is project)
				set blnSeld to (lstSeldProj ≠ {})
				if blnSeld then exit repeat
			end repeat
		end tell
		
		-- EITHER MOVE ANY SELECTED PROJECTS,
		if blnSeld then
			repeat with oProj in lstSeldProj
				move oProj to before projects
			end repeat
		else
			-- OR REMIND USER OF NEED TO SELECT PROJECTS.
			display dialog "No projects selected ..." buttons {"OK"} default button "OK" with title pTitle & "  ver. " & pVer
			return
		end if
	end tell
end tell
--

Last edited by RobTrew; 2012-04-12 at 12:06 AM.. Reason: Slight code house-keeping - added comments & simplified
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent actions from moving out of group when context is updated dru5h OmniFocus 1 for Mac 2 2013-03-17 10:25 AM
setting project + context via script (modifying a DEVONthink script) bernd OmniFocus Extras 2 2012-09-08 12:10 PM
Trouble moving actions around joegrant413 OmniFocus 1 for Mac 4 2012-01-13 02:16 PM
Keyboard shortcut for moving actions Flexattend OmniFocus 1 for Mac 1 2009-08-02 07:16 AM
Moving projects/actions between files louabill OmniFocus 1 for Mac 5 2007-11-25 08:42 AM


All times are GMT -8. The time now is 03:50 PM.


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