So I cobbled together this script, absolutely none of it original with me. It is mostly Apple sample code. It does all that I want it to do, except one thing. It does not place my cursor ready for typing in a name into the URL. I have to manually place it smack in the middle of the text between the two dots. I am not clever enough to figure out how to place the cursor on run between the two dots. I don't doubt it can be done, and I wondered if anyone out here could suggest it for me. thanks, cause I do love to cobble scripts together and play with them.
display dialog "Enter the URL to open:" default answer "http://www..com" buttons {"Don't do it", "Go"} default button "Go" giving up after 25
if button returned of result = "Go" then
open location (text returned of result)
end if
tell application "Safari"
activate
end tell
tell application "Finder"
if the (count of windows) is not 0 then
set collapsed of every window to true
end if
display dialog "Enter the URL to open:" default answer "http://www..com" buttons {"Don't do it", "Go"} default button "Go" giving up after 25
if button returned of result = "Go" then
open location (text returned of result)
end if
tell application "Safari"
activate
end tell
tell application "Finder"
if the (count of windows) is not 0 then
set collapsed of every window to true
end if