Internet Config has become a standard in the Mac world. It handles a dirty chore that every net application used to have to handle for itself -- setting of all the options, and configuring the helper apps you use while living on the net thru your Macintosh.The advantage of Internet Config is that it has a nice user interface, and once you tell IC what your email address is, for example, all your net applications know your address. And if you ever need to change it, you just have to go to one place to do it.
It's a totally logical thing, and it's great because it's an example of the Mac developer community working together to make all our lives easier. It deserves our support!
Scripting and Internet Config
In Frontier 4.0 we added full support of Internet Config. Leonard Rosenthol wrote the ICScriptor code extension, which we added to the standard shipping Frontier.root, with a few adapatations, extensions and conveniences.
As an AppleScript or UserTalk script writer, this makes your life easier, because the Frontier environment gives you full access to the IC settings. If you run a script in Frontier, it can read and write Internet Config settings.
This support is pre-installed in Frontier 4.0, you can depend on it being there as long as your users have IC installed on their system. Almost everyone requires it these days, so it's very likely that they already have it.
In case you don't have IC, you can download Internet Config 1.2 now.
It's in the Net menu
In Frontier 4.0, the Internet Config submenu of the Net menu has a command that launches the Internet Config app, and one that opens a table containing all your current IC preferences.
Getting a preference
In Frontier, jump to extensions.ic. There are lots of scripts in the table and a set of UCMDs in the code sub-table that connects to the IC extension. You don't have to understand most of what's going on here.
The main routine you'll call from your scripts is ic.getIcPreference. To see a set of examples, open extensions.ic.examples.oneliners. You can execute any of these oneline scripts by placing the cursor on the headline and pressing cmd-/.
Here are some of the commands in the oneliner outline:
ic.getIcPreference (ic.eventinfo.realName)
"Dave Winer"ic.getIcPreference (ic.eventinfo.organization)"UserLand Software"ic.getIcPreference (ic.eventinfo.mailAccount)"dwiner"ic.getIcPreference (ic.eventinfo.smtpHost)"mail.well.com"ic.getIcPreference (ic.eventinfo.mailPassword)"no.way"You can access any of the settings the same way. Here's a complete list of the entries in the ic.eventinfo table:
archieHost, archieHosts, binaryFileInfo, downloadFolder, editor, emailAddress, fingerHelper, fingerHost, ftpHelper, ftpHost, gopherHelper, gopherHost, infomacHost, infomacMirrors, ldapSearchbase, ldapServer, listFont, mailAccount, mailHeaders, mailHelper, mailPassword, netphoneHelper, newsHeaders, newsHelper, newsName, newsPassword, nntpHost, organization, phHost, plan, printerFont, quotingString, realName, screenFont, signature, smtpHost, telnetHelper, telnetHost, tn3270Helper, umichHost, umichMirrors, waisGateway, waisHelper, webHelper, whoisHelper, whoisHost, wwwHomePage, xnetphoneHelper.Getting all the Prefs
ic.getAllPrefs is a useful script to call when you want to get a look at all the IC prefs, or to save them for future reference. The caller provides the address of a Frontier table, and the script stores all the current IC settings as items in that table. Here's an example:
ic.getAllPrefs (@scratchpad.icprefs)
Here's what scratchpad.icprefs contains after making the call above:
archieHostAustralia:archie.au:
archieHosts{"Australia:archie.au:", "Austria, Linz:archie.edvz.uni-linz.ac.at:", "Austria, UniVie:archie.univie.ac.at:", "Belgium:archie.belnet.be:", "Canada, Bunyip:archie.bunyip.com:", "Canada, McGill:archie.cs.mcgill.ca:", "Canada, UQAM:archie.uqam.ca:", "Finland:archie.funet.fi:", "France:archie.univ-rennes1.fr:", "Germany:archie.th-darmstadt.de:", "Israel:archie.ac.il:", "Italy:archie.unipi.it:", "Japan, Kyoto:archie.kuis.kyoto-u.ac.jp:", "Japan, Wide:archie.wide.ad.jp:", "Korea, Hana:archie.hana.nm.kr:", "Korea, Kornet:archie.kornet.nm.kr:", "Korea, Sogang:archie.sogang.ac.kr:", "Norway:archie.uninett.no:", "Poland:archie.icm.edu.pl:", "Spain:archie.rediris.es:", "Sweden:archie.luth.se:", "Switzerland, SWITCH:archie.switch.ch:", "Taiwan:archie.ncu.edu.tw:", "UK, Hensa:archie.hensa.ac.uk:", "UK, IC:archie.doc.ic.ac.uk:", "USA, ANS:archie.ans.net:", "USA, InterNIC:archie.internic.net:", "USA, Rutgers:archie.rutgers.edu:", "USA, SURA:archie.sura.net:", "USA, UNL:archie.unl.edu:"}
binaryFileInfo""
downloadFolder8100:Installers:
editor{'pCre':'LAND', 'pNam':"UserLand Frontierª"}
emailAddressdwiner@well.com
fingerHelper{'pCre':'PnLF', 'pNam':"Finger"}
fingerHost""
ftpHelper{'pCre':'FTCh', 'pNam':"Fetch 3.0.1"}
ftpHost""
gopherHelper{'pCre':'TGOF', 'pNam':"TurboGopher"}
gopherHost""
infomacHostAustralia:ftp.info.au:micros/mac/info-mac/
infomacMirrors{"Australia:ftp.info.au:micros/mac/info-mac/", "Austria:ftp.univie.ac.at:mac/info-mac/", "Canada, Partial?:ftp.ucs.ubc.ca:pub/mac/info-mac/", "Finland:ftp.funet.fi:pub/mac/info-mac/", "Finland, MacBinary:ftp.jyu.fi:info-mac/", "France, IBP:ftp.ibp.fr:pub/mac/info-mac/", "Francenet:ftp.francenet.fr:pub/miroirs/info-mac/", "Germany:ftp.cs.tu-berlin.de:pub/mac/info-mac/", "Germany, Hannover:ftp.rrzn.uni-hannover.de:pub/info-mac/", "Germany, K, Partial?:ftp.uni-kl.de:pub/info-mac/", "Germany, Stuttgart:ftp.uni-stuttgart.de:pub/systems/mac/info-mac/", "Israel:ftp.technion.ac.il:pub/unsupported/mac/info-mac/", "Japan, IIJ:ftp.iij.ad.jp:pub/info-mac/", "Japan, Osaka:ftp.center.osaka-u.ac.jp:info-mac/", "Japan, Riken:ftp.riken.go.jp:pub/info-mac/", "Japan, pcvan:ftp.pcvan.or.jp:pub/info-mac/", "Korea:hwarang.postech.ac.kr:pub/mac/info-mac/", "Netherlands, Surfnet:info.nic.surfnet.nl:mirror-archive/software/info-mac/", "Netherlands, WAU:ftp.fenk.wau.nl:pub/mac/info-mac/", "Singapore:king.ncb.gov.sg:info-mac/", "Singapore:ftp.nus.sg:pub/mac/", "Sweden, Lund:ftp.lth.se:mac/info-mac/", "Sweden, sunet:ftp.sunet.se:pub/mac/info-mac/", "Switzerland, SWITCH:ftp.switch.ch:mirror/info-mac/", "Taiwan, NCTU:ftp.edu.tw:Macintosh/info-mac/", "Taiwan, NCU:imftp.mgt.ncu.edu.tw:pub/mac/info-mac/", "UK:src.doc.ic.ac.uk:packages/info-mac/", "USA, AMUG:ftp.amug.org:pub/info-mac/", "USA, AOL:mirrors.aol.com:pub/info-mac/", "USA, Apple:mirror.apple.com:mirrors/Info-Mac.Archive/", "USA, Hawaii:ftp.hawaii.edu:mirrors/info-mac/", "USA, HyperArchive:hyperarchive.lcs.mit.edu:/", "USA, Pacific HiTech:ftp.pht.com:/mirrors/info-mac/", "USA, Rice:ricevm1.rice.edu:", "USA, UIUC:mrcnext.cso.uiuc.edu:pub/info-mac/", "USA, UIowa:grind.isca.uiowa.edu:mac/infomac/", "USA, UUNet, Virginia:ftp.uu.net:archive/systems/mac/info-mac/", "USA, Wash Uni:wuarchive.wustl.edu:systems/mac/info-mac/", "USA, dataplex:ftp.dataplex.net:info-mac/", "USA, orst:ftp.orst.edu:pub/info-mac/"}
ldapSearchbase""
ldapServer""
listFont{'pFSz':12, 'pFFa':0, 'pFNa':"Geneva"}
mailAccountdwiner
mailHeaders""
mailHelper{'pCre':'NNTP', 'pNam':"NewsWatcher"}
mailPasswordlotsa.luck
netphoneHelper{'pCre':'EMC8', 'pNam':"NetPhone"}
newsHeaders""
newsHelper{'pCre':'NNTP', 'pNam':"NewsWatcher"}
newsName""
newsPasswordi.have.protected.my.password
nntpHost""
organizationUserLand Software
phHost""
plan""
printerFont{'pFSz':12, 'pFFa':0, 'pFNa':"Geneva"}
quotingString>
realNameDave Winer
screenFont{'pFSz':12, 'pFFa':0, 'pFNa':"Geneva"}
signature""
smtpHostmail.well.com
telnetHelper{'pCre':'NCSA', 'pNam':"NCSA Telnet"}
telnetHost""
tn3270Helper{'pCre':'GFTM', 'pNam':"tn3270"}
umichHostUMich:mac.archive.umich.edu:mac/
umichMirrors{"UMich:mac.archive.umich.edu:mac/", "Australia, BHP:ftp.bhp.com.au:mac/mirrors/umich/", "Australia, RMIT:ftp.bf.rmit.edu.au:/pub/mac/umich/", "Czech Republic:ftp.ruk.cuni.cz:pub/mac/", "England:src.doc.ic.ac.uk:computing/systems/mac/", "Germany, Paderborn:ftp.uni-paderborn.de:Mirrors/mac.archive.umich.edu/", "Germany, Stuttgart:info2.rus.uni-stuttgart.de:afs/umich.edu/group/itd/archive/mac/", "Hong Kong:ftp.hk.super.net:mirror/mac/", "Israel:ftp.technion.ac.il:pub/unsupported/mac/umich/", "Japan Inter Spin:ftp.inter.spin.ad.jp:pub/Mac/Merit.mirror/", "Japan, Hokudai:ftp.eos.hokudai.ac.jp:pub/mac/umich/", "Japan, IIJ:ftp.iij.ad.jp:pub/mac/umich/", "Japan, Riken:ftp.riken.go.jp:pub/mac/umich/", "Japan, utokyo:ftp.u-tokyo.ac.jp:pub/mac/umich/", "Sweden, Luth:ftp.luth.se:pub/mac/mirror-umich/", "Sweden, sunet:ftp.sunet.se:pub/mac/mirror-umich/", "Switzerland, SWITCH:ftp.switch.ch:mirror/umich-mac/", "Taiwan, CCU:ftp.ccu.edu.tw:pub/mac/", "Taiwan, Nctuccca:nctuccca.edu.tw:Macintosh/umich-mac/", "USA, AOL:mirrors.aol.com:pub/mac/", "USA, Apple:mirror.apple.com:mirrors/mac.archive.umich.edu/", "USA, CDROM:ftp.cdrom.com:pub/mac/umich/", "USA, Pacific HiTech:ftp.pht.com:pub/mac/umich/", "USA, UIowa:grind.isca.uiowa.edu:mac/umich/", "USA, Wash Uni:wuarchive.wustl.edu:systems/mac/umich.edu/", "USA, orst:ftp.orst.edu:pub/mirrors/archive.umich.edu/"}
waisGateway""
waisHelper{'pCre':'MWAS', 'pNam':"MacWAIS"}
webHelper{'pCre':id, 'pNam':"Internet Explorer 2.0"}
whoisHelper{'pCre':'PnLF', 'pNam':"Finger"}
whoisHost""
wwwHomePagehttp://www.scripting.com/dwiner/
xnetphoneHelper{'pCre':'EMC8', 'pNam':"NetPhone"}
Yes, that was done with a macro. I couldn't resist! There was a lot more info in there than I thought there was... Neat!
Setting a preference
The other side of getting is setting. You provide the name of a preference and a value, and the ic.setIcPreference takes care of the rest.
Here's an example of a call to ic.setIcPreference:
ic.setIcPreference (ic.eventinfo.wwwHomePage, "http://www.scripting.com/dwiner/")
Many thanks!Internet Config is the result of some great work by the Mac net community, led by Peter N Lewis and Quinn. And thank you to Leonard Rosenthol for making IC work in the Frontier enviornment. We all owe them our gratitude for taking the lead here. Thanks!
And thanks to everyone for having a sense of humor! That really comes thru in the whole IC effect.
Cooooool!
Pointers
Quinn's Site -- The official Internet Config site, operated by Quinn, one of the co-authors of the IC software. Dave Winer
This page was last built with Frontier on a Macintosh on Wed, Jun 5, 1996 at 1:03:48 PM. Thanks for checking it out! Dave |