Scripting 10.5 vpn connection

Hello,
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:

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

if the internet is false then
quit
end if

if theinternet is true then
tell application “Internet Connect.app”

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
quit
else

«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.

Thanks!

Hi:

From what I’ve heard, Internet Connect.app 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.