Can I get opinions on there being an easier way to do this?
I've set up a key-combo via Butler that pulls up this script.
set getURL to display dialog "URL?" default answer "" buttons {"net",
"org", "com"} default button 3
set theURL to text returned of getURL
set theDomain to button returned of getURL
if theURL begins with "http://www." then
set theURL2 to theURL
else if theURL begins with "www." then
set theUR2 to "http://" & theURL
else
set theURL2 to "http://www." & theURL
end if
if theURL2 ends with ".com" or ".net" or ".org" then
tell application "Safari"
activate
open location theURL2
end tell
else
tell application "Safari"
activate
open location theURL2 & "." & theDomain
end tell
end if
The point is I can type in a URL and it pipes it to Safari.
If I just pipe the input straight into Safari, I get an error, so I
wrote the two if routines to handle some possible combinations.
Any feedback?
>> Stay informed about: Script