This script first bunts the application over to xSlimmer, which removes excess architectures and languages from the application.
It waits until that application quits (i.e. doesn't appear in the Finder's list of processes), asks me to confirm the application's name, and then creates a task on my to-do list at Remember the Milk to try out the application and decide whether or not to keep it.
- Code: Select all
on hazelProcessFile(theFile)
tell application "Xslimmer"
activate
open theFile
end tell
tell application "Finder"
repeat until name of processes does not contain "Xslimmer"
delay 5
end repeat
end tell
set file_name to name of (info for theFile)
tell application "System Events"
activate
set shortquestion to display dialog "Short name for this application?" default answer file_name default button 2
set shortname to text returned of shortquestion
end tell
set RTMurl to "http://m.rememberthemilk.com/add?name=Look+over+" & shortname & "+and+decide+whether+it's+an+application+you+want+to+keep+around,+or+whether+it+should+be+deleted.&list=listIDnumbergoeshere&priority=&due=&repeat=&estimate=&tags=@mac+apptryout&url=&add=\"Add%20Form\""
do shell script "/usr/bin/open \"" & RTMurl & "\""
end hazelProcessFile