-- 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&return&POSIXpathofdefault_tor_path&return&POSIXpathofdefault_privoxy_path&return&POSIXpathofdefault_tor_startup_path&return&POSIXpathofdefault_privoxy_startup_path&return&return&"If this looks correct, 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(POSIXpathofshell_script)withadministratorprivileges
onerror
display dialog"Too many errors, quitting."buttons{"Quit"}defaultbutton"Quit"withiconstopgivingupafter3
quit
endtry
-- So Long and Thanks for all the Fish!
display dialog"Thank you for using tor!"buttons{"Ok"}givingupafter3
else
display dialog"Thank you for your continued use of Tor & Privoxy"buttons{"You're welcome."}givingupafter3