Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Adds currently selected folder Finders Favorites sidebar
- on addToFavorites()
- tell application "Finder" to activate
- tell application "Finder" to select window 1
- tell application "System Events"
- tell process "Finder"
- tell menu bar 1
- tell menu bar item "File"
- tell menu "File"
- click menu item "Add to Sidebar"
- end tell
- end tell
- end tell
- end tell
- end tell
- end addToFavorites
- --Wait for all external drives to mount
- repeat
- tell application "Finder"
- if disk "Backup" exists then
- exit repeat
- else
- delay 1
- end if
- end tell
- end repeat
- repeat
- tell application "Finder"
- if disk "Time Machine" exists then
- exit repeat
- else
- delay 1
- end if
- end tell
- end repeat
- repeat
- tell application "Finder"
- if disk "Dropbox" exists then
- exit repeat
- else
- delay 1
- end if
- end tell
- end repeat
- repeat
- tell application "Finder"
- if disk "Shared" exists then
- exit repeat
- else
- delay 1
- end if
- end tell
- end repeat
- --Navigate to each disk and folder and then add the current selection to Finders Favorites sidebar
- tell application "Finder"
- make new Finder window
- set target of window 1 to folder "Projects" of disk "Working"
- my addToFavorites()
- set target of window 1 to folder "Documents" of disk "Working"
- my addToFavorites()
- set target of window 1 to folder "Dropbox" of disk "Dropbox"
- my addToFavorites()
- set target of window 1 to folder "Downloads" of disk "Archive"
- my addToFavorites()
- set target of window 1 to folder "Temporary" of disk "Working"
- my addToFavorites()
- end tell
- tell application "Finder" to close window 1
Add Comment
Please, Sign In to add comment