AppleScript で VPN(pptp)接続したい

ログオンと同時にVPNに接続したい時に、AppleScriptVPN接続のスクリプトを作っちゃうと便利です。

tell application "Internet Connect"
activate
connect
quit
end tell

PPPoEにも応用が効きます。
ついでに、NASマウントのスクリプトはこう。

tell application "Finder"
activate
mount volume "afp://TeraStation/share1"
mount volume "SuperUserDisk" on server "TeraStation" as user name "SuperUser" with password "himitsu"
mount volume "cifs://TeraStation/GatesDisk" as user name "bill" with password "gates"
end tell

両方ともちゃんと.scptじゃなくて.appで保存しないと起動項目では無効です。