display dialog "Open in" buttons {"Cancel", "All Browsers", "Just Safari"} default button 3
copy the result as list to {the button_pressed}
if the button_pressed is equal to "All Browsers" then
display dialog "Enter the URL to go to:" default answer "http://" buttons {"Choose Local File", "Cancel", "OK"} default button 3
copy the result as list to {the empty_var, the button_pressed}
if the button_pressed is equal to "OK" then
copy the result as list to {the goto_URL}
tell application "Finder"
launch application "Safari"
launch application "Camino"
launch application "OmniWeb"
launch application "iCab"
launch application "Internet Explorer"
launch application "Netscape"
launch application "Mozilla"
wait
end tell
tell application "Safari"
activate
make new document at beginning of documents
open location goto_URL
end tell
tell application "Camino"
activate
make new document at beginning of documents
open location goto_URL
end tell
tell application "OmniWeb"
activate
make new document at beginning of documents
GetURL goto_URL
end tell
tell application "iCab"
Activate
make new window
OpenURL goto_URL
end tell
tell application "Internet Explorer"
Activate
GetURL goto_URL
end tell
tell application "Netscape"
activate
Get URL goto_URL
end tell
tell application "Mozilla"
activate
Get URL goto_URL
end tell
else if the button_pressed is equal to "Choose Local File" then
set the local_file to choose file with prompt "Choose a local file to open:"
tell application "Finder"
launch application "Safari"
launch application "Camino"
launch application "OmniWeb"
launch application "iCab"
launch application "Internet Explorer"
launch application "Netscape"
launch application "Mozilla"
end tell
tell application "Safari"
activate
make new document at beginning of documents
open local_file
end tell
tell application "Camino"
activate
make new document at beginning of documents
open local_file
end tell
tell application "OmniWeb"
activate
make new document at beginning of documents
open local_file
end tell
tell application "iCab"
Activate
make new window
ShowFile local_file
end tell
tell application "Internet Explorer"
Activate
open local_file
end tell
tell application "Netscape"
activate
open local_file
end tell
tell application "Mozilla"
activate
open local_file
end tell
end if
else if the button_pressed is equal to "Just Safari" then
display dialog "Enter the URL to go to:" default answer "http://" buttons {"Choose Local File", "Cancel", "OK"} default button 3
copy the result as list to {the empty_var, the button_pressed}
if the button_pressed is equal to "OK" then
copy the result as list to {the goto_URL}
tell application "Safari"
activate
make new document at beginning of documents
open location goto_URL
end tell
else if the button_pressed is equal to "Choose Local File" then
set the local_file to choose file with prompt "Choose a local file to open:"
tell application "Safari"
activate
make new document at beginning of documents
open local_file
end tell
end if
end if