***Before acting on this email or opening any attachment you are advised to read the disclaimer at the end of this email***
************************************
Hi there,
Someone, I think it may have been Kai, once wrote this script for me for removing items from the sidebar. It generates a list of the items in the sidebar and allows you to select which ones you'd like removing.
Regards,
Nick
on chooseItems from theList under prmpt tell application (path to frontmost application as Unicode text) return (choose from list theList with prompt prmpt with multiple selections allowed) end tell end chooseItems
set computerName to computer name of (system info) set desktopName to displayed name of (info for (path to desktop)) set networkName to displayed name of (info for alias "Network:") set userName to displayed name of (info for (path to current user folder))
tell application "Finder" if ((count each Finder window) is 0) then make new Finder window end tell
tell application "System Events" tell application process "Finder" set frontmost to true tell list 1 of scroll area 1 of splitter group 1 of window 1
set sidePanelNames to name of UI elements
set itemsToDelete to my (chooseItems from sidePanelNames under "Choose which side panel items to delete:") if (itemsToDelete is false) then error number -128
repeat with i from 1 to (count itemsToDelete) set thisItem to item i of itemsToDelete
--select UI element thisItem
perform action "AXShowMenu" of UI element thisItem if (thisItem is computerName) then key code {125, 125, 125, 125, 125, 49} else if (thisItem is networkName) or (thisItem is userName) then key code {125, 125, 125, 125, 125, 49} else if (thisItem is desktopName) then key code {125, 125, 125, 125, 125, 125, 125, 125, 49} else key code {125, 125, 125, 125, 125, 125, 49} end if delay 0.5 -- Lengthen if necessary. end repeat end tell end tell end tell
**********************************************************************
Communisis plc - registered no: 2916113 is a limited company registered in England and Wales and whose registered office is at Wakefield Road, Leeds, LS10 1DU.
Please Note: This e mail and its attachments contain only the opinions of the sender and do not necessarily reflect the policy (s) of the Communisis group in general.
Confidentiality: This e-mail and the contents of any attachments are intended for the named recipient(s) only and may be confidential. If you have received this e-mail and its contents in error you must take no action based on them, nor must you copy or show them to anyone. Please reply to this e-mail and highlight the error.
Warning: Although this e-mail and any attachments have been scanned for viruses, Communisis cannot guarantee that they are virus free. The Communisis group therefore accepts no responsibility for any loss or damage caused by transmission of this e-mail.
**********************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
|