Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Sidebar Adding




On 23 Mar 2007, at 12:55, Chris Tangora wrote:

Does anybody have a pre-made script that will add a specific folder to the sidebar, or something i can re-code a little to do it. Before I go off writing anew, I figured I'd just ask.

I suppose you could always try something like this, Chris:

---------------

set f to choose folder with prompt "Choose a folder to add to Sidebar:"

tell application "Finder"
	activate
	set {c, s} to {count windows, selection}
	select f
	tell application "System Events" to keystroke "t" using command down
	if (count windows) > c then
		close front window
	else
		select s
	end if
end tell

---------------

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Scripting Sidebar Adding (From: Chris Tangora <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.