Yanlışlıkla çöpe atılan tüm dosyaları kendi klasörleri içine geri gönderir
Aşağıdaki kodu metin editörüne yapıştırıp Applescript dosya formatında kaydedin. Sadece çift tıklayın ve çalışacaktır 🙂
İşte kod:
tell application “Finder” to activate
tell application “System Events”
tell process “Finder”
repeat 100 times
key code 125
key down command
delay 0.2 — adjust delay as needed
key code 51
key up command
end repeat
end tell
end tell
Yukarıdaki başarısız olursa
repeat 4173 times –or as many files you have
tell application “Finder” to open trash –open the trash folder
tell application “Finder” to activate
tell application “System Events”
tell process “Finder”
delay 0.2 — adjust delay as needed
key code 125 –move down to get focus on a file
key down command –hold command key
delay 0.2 — adjust delay as needed
key code 51 –hit delete
key up command –release command
end tell
end tell
delay 0.2 — adjust delay as needed
tell application “Finder” to close every window –close everything for the next cycle
end repeat