Official connection state values for Internet Connect?

Is there somebody please who can point me to a list of expected values for the connection state of Internet Connect? I’m referring to possible values returned by the statement below:

tell application “Internet Connect”
get the state of the status of PPP configuration “Internal Modem”
end tell

A preliminary list I have come up with through trial and error:
0 = Idle (not connected)
1 = Dialing…
2 = Connecting…
3 = Error
4 = Connected (as reported by others)
5 = Disconnecting… (as reported by others)
8 = Connected (on my system)
9 = Disconnecting… (on my system)
10 = Could not connect (on my system)

Strangely, I have seen people mention that a numeric value of 4 means “connected”, while my own machine returns 8 when connected instead.

Also, is the state the same no matter what type of configuration (PPP, AirPort, etc.) or are there significant differences?

There must be some official information somewhere, right?

Thanks for your help,

– Thomas Fruin

I am trying your script, the codes seem to be the same for PPP configuration. Code 7 must be something like “Authenticating”. Code 4 may be “connected”, but a kind of connection before authenticating.

I am new to Applescript, so can anyone explain me why cannot I connect?

tell application "Internet Connect"
connect PPPoE configuration "Built-in Ethernet"
end tell

I am trying to write a script for reconnecting me after a phone failure. I would run this script periodically (with cron + osascript)

	set estado to the state of the status of PPPoE configuration "Built-in Ethernet"
	if estado is not 8 then connect PPPoE configuration "Built-in Ethernet"
	end if

I thank in advance any help you can give me!

Zoltan Paulinyi

Model: iMac
AppleScript: 1.9.3
Browser: Safari 312
Operating System: Mac OS X (10.3.9)