View Full Version : Applescripting the system preferences
who ?
02-01-2002, 03:44 AM
does anybody know if it is possible to change network preference settings via applescript ? My dad uses either a LAN network connection at work, or a modem connection at home, and finds it cumbersome to switch everything (other DNS, other router, ...) everytime.
can this be automated with a script that he can simply doubleclick ?
thanks !
eriklager
02-01-2002, 08:29 AM
Originally posted by who ?
My dad uses either a LAN network connection at work, or a modem connection at home, and finds it cumbersome to switch everything (other DNS, other router, ...) everytime.
To make the switching the network settings easier you could have one "location" for the home settings and one for the work settings. To do this, select New Location in the Location pop-up menu in the Network Preferences. Enter a suitable name like "work". Then select Edit Location from the same pop-up menu and change the name of the Automatic location to "home". You now have two different setting profiles. You can switch location from the apple menu.
Erik
who ?
02-01-2002, 08:41 AM
can thise locations be switched using applescript ? There's a bunch of other stuff that needs to be switched too, so if I could pour everything into one script, that would be cool !
eriklager
02-01-2002, 11:54 AM
I don't know how to change location with an applescript but this is a useful way to change other settings:
do shell script "defaults write com.apple.finder AppleShowAllFiles \"<true/>\""
Enter the above line in the Script Editor. This will make all files visible in the Finder (to reverse the effect, change <true/> to <false/>, Finder must be restarted before changes take effect). You can use this method to change a lot of other settings, enter "defaults read" in the terminal to see what options are available:
defaults read com.apple.terminal
will show the settings available for the Terminal application.
Erik
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.