Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 22, 2009, 04:28 PM   #1
morrisman1
macrumors 6502
 
Join Date: Apr 2008
Location: Bottom end of the bottom half - Invercargill New Zealand
Send a message via MSN to morrisman1
change safari homepage using a script

hi all,

basically i want to prank my mate, i want to write a script which changes his homepage to a particular page, and then set this script to run on startup.

is there a way to do this? He uses safari on 10.5.7

thanks very much, this is for jokes, not malicious reasons (I will put him back to normal after a week)
__________________
Hackintosh: iDeneb 10.5.7, 1.8 C2D, GA-G31M-ES2L, 2gb ram, 9400 GT 512MB, 1.5TB HDD
Limited Edition: Macbook 2.0ghz Aluminium.
Dell WFP2408 24" PVA
morrisman1 is offline   0 Reply With Quote
Old Jul 22, 2009, 04:31 PM   #2
miiles
macrumors regular
 
Join Date: Aug 2008
Location: California
Quote:
Originally Posted by morrisman1 View Post
hi all,

basically i want to prank my mate, i want to write a script which changes his homepage to a particular page, and then set this script to run on startup.

is there a way to do this? He uses safari on 10.5.7

thanks very much, this is for jokes, not malicious reasons (I will put him back to normal after a week)
Any reason why you couldn't just change his home page in the preferences?

EDIT: Actually, I have a feeling he would figure that out after a week.
miiles is offline   0 Reply With Quote
Old Jul 22, 2009, 04:39 PM   #3
morrisman1
Thread Starter
macrumors 6502
 
Join Date: Apr 2008
Location: Bottom end of the bottom half - Invercargill New Zealand
Send a message via MSN to morrisman1
yea, the idea is so that it will change automatically on startup. Where does safari keep the .plist with the homepage url?
__________________
Hackintosh: iDeneb 10.5.7, 1.8 C2D, GA-G31M-ES2L, 2gb ram, 9400 GT 512MB, 1.5TB HDD
Limited Edition: Macbook 2.0ghz Aluminium.
Dell WFP2408 24" PVA
morrisman1 is offline   0 Reply With Quote
Old Jul 22, 2009, 04:51 PM   #4
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Honestly, it would be a better prank to change it to one of four sites every second or third time he started his browser. Consistent behavior is not nearly as maddening as seemingly random behavior.

-Lee
lee1210 is offline   0 Reply With Quote
Old Jul 22, 2009, 05:42 PM   #5
mslide
macrumors 6502a
 
Join Date: Sep 2007
Quote:
Originally Posted by morrisman1 View Post
Where does safari keep the .plist with the homepage url?
~/Library/Preferences/com.apple.Safari.plist

Key = HomePage
mslide is offline   0 Reply With Quote
Old Jul 23, 2009, 06:53 AM   #6
morrisman1
Thread Starter
macrumors 6502
 
Join Date: Apr 2008
Location: Bottom end of the bottom half - Invercargill New Zealand
Send a message via MSN to morrisman1
Quote:
Originally Posted by mslide View Post
~/Library/Preferences/com.apple.Safari.plist

Key = HomePage
nothing in there seems to relate to the homepage. I set it to ebay, then searched for ebay in that .plist and it wasnt there
__________________
Hackintosh: iDeneb 10.5.7, 1.8 C2D, GA-G31M-ES2L, 2gb ram, 9400 GT 512MB, 1.5TB HDD
Limited Edition: Macbook 2.0ghz Aluminium.
Dell WFP2408 24" PVA
morrisman1 is offline   0 Reply With Quote
Old Jul 23, 2009, 08:11 AM   #7
mslide
macrumors 6502a
 
Join Date: Sep 2007
Quote:
Originally Posted by morrisman1 View Post
nothing in there seems to relate to the homepage. I set it to ebay, then searched for ebay in that .plist and it wasnt there
Odd. That's where where mine is. I was changing it to different things to verify right before I posted that before.
mslide is offline   0 Reply With Quote
Old Jul 23, 2009, 08:17 AM   #8
morrisman1
Thread Starter
macrumors 6502
 
Join Date: Apr 2008
Location: Bottom end of the bottom half - Invercargill New Zealand
Send a message via MSN to morrisman1
screenshot of your .plist an option? might help a bit.

I opened com.apple.safari.plist out of /macintosh hd/users/my account/library/preferences

thats the right directory isnt it?
__________________
Hackintosh: iDeneb 10.5.7, 1.8 C2D, GA-G31M-ES2L, 2gb ram, 9400 GT 512MB, 1.5TB HDD
Limited Edition: Macbook 2.0ghz Aluminium.
Dell WFP2408 24" PVA
morrisman1 is offline   0 Reply With Quote
Old Jul 23, 2009, 08:36 AM   #9
mslide
macrumors 6502a
 
Join Date: Sep 2007
Quote:
Originally Posted by morrisman1 View Post
screenshot of your .plist an option? might help a bit.
Here you go...
Attached Thumbnails
Click image for larger version

Name:	Picture 1.jpg
Views:	59
Size:	133.1 KB
ID:	184552  
mslide is offline   0 Reply With Quote
Old Jul 24, 2009, 06:05 AM   #10
morrisman1
Thread Starter
macrumors 6502
 
Join Date: Apr 2008
Location: Bottom end of the bottom half - Invercargill New Zealand
Send a message via MSN to morrisman1
what program do you open the .plist with? im just using txt edit
__________________
Hackintosh: iDeneb 10.5.7, 1.8 C2D, GA-G31M-ES2L, 2gb ram, 9400 GT 512MB, 1.5TB HDD
Limited Edition: Macbook 2.0ghz Aluminium.
Dell WFP2408 24" PVA
morrisman1 is offline   0 Reply With Quote
Old Jul 24, 2009, 08:11 AM   #11
mslide
macrumors 6502a
 
Join Date: Sep 2007
Quote:
Originally Posted by morrisman1 View Post
what program do you open the .plist with? im just using txt edit
'Property List Editor'. It's the default editor for me. If not, it's in /Developer/Applications/Utilities/. Note, I'm not sure if you need to have XCode installed of if that utility comes standard with macs.
mslide is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Set Safari homepage on iPad 3...help Keukasmallie iPad Tips, Help and Troubleshooting 1 Nov 3, 2013 01:02 AM
iTunes: Export > Change metatags > Re-import - script? Nubben Mac Applications and Mac App Store 0 Nov 1, 2013 05:53 AM
iPhone: cocoPPa/safari 'add to homepage' file directory amydenice Jailbreaks and iOS Hacks 3 May 17, 2013 06:20 PM
Homepage a new Mac App that lets you build your own Homepage! Dock Status Mac Applications and Mac App Store 12 Oct 31, 2012 01:01 AM
Script to change proxy settings tatchley Mac Programming 5 Oct 19, 2012 09:49 PM

Forum Jump

All times are GMT -5. The time now is 01:43 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC