From Mac OS X Hints.com: This script uses Panther’s built in GUI scripting to turn on Internet Connection Sharing in OS X v.10.3.
OS version:
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 10
tell window "Sharing"
if (exists tab group 1) then
tell tab group 1
click radio button "Internet"
delay 1
click button "Start"
delay 1
end tell
end if
if exists sheet 1 then
tell sheet 1
click button "Start"
end tell
end if
end tell
end tell
end tell
ignoring application responses
tell application "System Preferences" to quit
end ignoring