Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TheStu

macrumors 65816
Original poster
Aug 20, 2006
1,243
0
Carlisle, PA
So my buddy wants to switch to Safari, but is held back by 2 things.

AdBlock: I have already taken care of this by showing him how well Safari-Adblock works.

Multiple Tabs as homepage: I found a script from about 4 years ago that still works with Safari, and have since modified it to launch Safari and then close itself once the tabs are loaded.

What I want to know is, is there anyway to make that script
A: Launch with Safari, so instead of having to use that script to launch Safari, it instead will be launched by Safari, and then after running itself will close like it already does
B: Make it more user friendly. Right now, to change the sites that open, you have to edit the script directly, and although he is more than capable of doing this, if I wanted to distribute this script out so others could have it, they might not want to edit it directly.

Really, A is the important one, finding a way to have it launch with Safari so he doesn't have to have an extra item on his dock.
 

TheStu

macrumors 65816
Original poster
Aug 20, 2006
1,243
0
Carlisle, PA
I really am curious to know if this is possible. Surely this is not so difficult that it has all of you stumped beyond the capability to form rational thoughts.
 

TheStu

macrumors 65816
Original poster
Aug 20, 2006
1,243
0
Carlisle, PA
Can you post your script that you want modified?

set the URL_list to {"http://forums.anandtech.com", "https://forums.macrumors.com"}

do shell script "open -a Safari"

tell application "Safari"
activate
repeat with i from 1 to number of items in URL_list
set this_URL to item i of URL_list
my new_tab()
set the URL of document 1 to this_URL
end repeat
end tell

on new_tab()
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click menu item "New Tab" of ¬
menu "File" of menu bar 1
end tell
end tell
end new_tab
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.