-- Display what we're removing and ask for validation
-- this is the simplest way to do this
setremove_metodisplay dialog"Welcome to the Tor + Privoxy Uninstaller. This program will remove:"&return&default_tor_path&return&default_privoxy_path&return&default_tor_startup_path&return&default_privoxy_startup_path&return&return&"If this does not look right, choose Yes. Otherwise, choose No."buttons{"Yes","No"}defaultbutton"No"
-- Run a shell script to do all the unix work since applescript can't see it at all
ifbutton returnedofresultis"Yes"then
try
do shell script(shell_script)withadministratorprivileges
onerror
display dialog"Too many errors, quitting."buttons{"Quit"}defaultbutton"Quit"withiconstopgivingupafter5
quit
endtry
-- So Long and Thanks for all the Fish!
display dialog"Thank you for using tor!"buttons{"Ok"}givingupafter5
else
display dialog"Thank you for your continued use of Tor & Privoxy"buttons{"You're welcome."}