After looking at RickoKid's last hint about toggling web proxy settings I had a think about creating an applescript using the Apple GUI plugin that would switch on Internet Connection Sharing over my second ethernet card and Airport. This is what i've come up with. It's simple and can easily be modified with some error checking routines and other bit 'n peices but i'm too lazy to do that.
tell application "System Preferences" activate end tell tell application "System Events" tell process "System Preferences" click menu item "Sharing" of menu "View" of menu bar 1 delay 3 tell window "Sharing" tell tab group 1 click radio button "Internet" delay 2 click button "Start" delay 2 end tell end tell end tell end tell ignoring application responses tell application "System Preferences" to quit end ignoringJust save it as an Application in ScriptEditorm, and pop it into your Login Items in System Prefs. To get UI scripts to function, you must turn on an option in System Preferences. Open System Preferences and click Universal Access. Click Seeing, then select "Enable access for assistive devices;" otherwise the plugin can't work.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20031021101249432