Scripting 10.5 vpn connection

I am attempting to connect our VPN connection automatically if an active internet connection exists. Everything was working fine until 10.5. The current script looks like this:

do shell script “curl ‘’”
set theinternet to true
on error
set theinternet to false
end try

if the internet is false then
end if

if theinternet is true then
tell application “Internet”

set PPTPc to get name of «class cnft» 1
set vpnState to «class RAsb» of «class RSst» of «class cnfg» PPTPc
set newConnection to false
if vpnState is 8 then

«event netcconn» «class cnfg» PPTPc
delay 8
if «class RAsb» of «class RSst» of «class cnfg» PPTPc is 8 then
set newConnection to true
end if
end if
end tell
end if

Furethermore, this scipt will run on a cron tab every hour.

Any help would be greatly appreciated.



From what I’ve heard, Internet no longer exists in 10.5… but the Tiger version apparently runs fine on Leopard.

So, if you need it, find a Tiger system and grab a copy.

Or, perhaps someone will chime in with a Leopard specific solution.

Peter B.