- Registriert
- 09.02.08
- Beiträge
- 212
Hallo zusammen, habe folgendes AppleScript hier imForum gefunden, um automatisch eine VPN (PPTP) Verbindung aufzubauen:
Leider kommt im Skripteditor beim Abspeichern immer die Fehlermeldung "Zeilenende erwartet, Identifer "configuration" gefunden."
ich habe absolut keine Ahnung von AppleScript und wäre sehr für eure Hilfe dankbar. Nutze Leopard.
EDIT:
Folgendes Skript geht:
Problem damit gelöst...
Code:
set NetName to do shell script ("system_profiler SPAirPortDataType |grep -e " & quoted form of "Current Wireless Network:" & " |awk '{print $4,$5,$6,$7}'") as string
if NetName contains "AnasHome" then
-- at home, no pptp connection
else if NetName contains "Uni-Bremen" then
-- on campus, start pptp-connection
tell application "Internet Connect"
activate
connect configuration "VPN (PPTP)"
quit
end tell
else
-- somewhere else, do nothing
end if
ich habe absolut keine Ahnung von AppleScript und wäre sehr für eure Hilfe dankbar. Nutze Leopard.

EDIT:
Folgendes Skript geht:
Code:
tell application "System Events"
tell current location of network preferences
set VPNservice to service "VPN (L2TP) 2" -- name of the VPN service
if exists VPNservice then connect VPNservice
end tell
end tell
Problem damit gelöst...