Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script iterates through all files in trash
- -- and put them back, because of MacOs don't
- -- allow to user this feature with multiple selection
- --
- -- 2012/Tommy the Blackbird
- tell application "AppleScript Utility"
- set GUI Scripting enabled to true
- end tell
- tell application "Finder"
- open trash
- activate trash
- select files in trash
- set filesInTrash to the selection
- repeat with TrashedFile in filesInTrash
- select TrashedFile
- tell application "System Events"
- key code 51 using command down
- end tell
- delay 1
- end repeat
- close every window
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement