Created
May 28, 2013 08:14
-
-
Save faresd/5661253 to your computer and use it in GitHub Desktop.
AppleScript restore multiple files from trash Mac os
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
delay 15 -- adjust delay as needed | |
repeat 40000 times | |
try | |
tell application "Finder" to close every window | |
delay 0.09 -- adjust delay as needed | |
set theDigit to func(37) | |
on error | |
do shell script "killall Finder" | |
delay 10 -- adjust delay as needed | |
set theDigit to func(37) | |
end try | |
end repeat | |
on error | |
do shell script "killall Finder" | |
repeat 40000 times | |
delay 20 -- adjust delay as needed | |
set theDigit to func(37) | |
end repeat | |
end try | |
to func(bla) | |
tell application "Finder" to close every window | |
repeat 100 times | |
tell application "AppleScript Utility" | |
set GUI Scripting enabled to true | |
end tell | |
tell application "Finder" | |
open trash | |
activate trash | |
tell application "System Events" | |
key code 125 | |
key code 51 using command down | |
end tell | |
end tell | |
delay 0.1 -- adjust delay as needed | |
end repeat | |
tell application "Finder" to close every window | |
delay 0.099 -- adjust delay as needed | |
end func |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'Put Back' multiple items in Trash