电玩巴士-iPhone频道-软件 |
Posted: 04 Jul 2014 02:29 AM PDT 作为重度 Google 用户,我希望上网时苹果电脑能一直连着 VPN。但是离开电脑时合上笔记本的盖子让 MacBook Pro 休眠,再打开,VPN 就断了。有时候 Mac 所在的网络不稳定,上着上着网 VPN 也会自己断开。如何重新自动连接你? 点击 Mac 屏幕右上角的放大镜按钮,搜索 “AppleScript 编辑器”(没引号,有空格)。打开软件,粘入下面的代码,注意,第四行那个 "VPNCloud" 要改成你自己的 VPN 名字。去网络偏好设置里或者点击屏幕顶部菜单栏的 VPN 图标就能看到你起的名字。储存成应用程序,如上图所示。至于叫什么名字,随你便。 tell application "System Events" tell current location of network preferences set myConnection to the service "VPNCloud" if myConnection is not null then if current configuration of myConnection is not connected then connect myConnection end if end if end tell return 120 end tell end idle 运行你写的这个 “软件”,每次 VPN 断开,几秒钟后 Mac 就会自动重新连接 VPN 了。嫌 Dock 图标不爽的话可以在 AppleScript 编辑器里自定义,如上图所示,拖拽新图标到左边箭头所指的那里替换那个 .icon 文件就行。右击 Dock 图标可以选择让 Mac 开机自动运行这个程序。嫌它运行时占了一个 Dock 位置的话,这里有办法隐藏掉图标。 |
You are subscribed to email updates from 电玩巴士-iPhone频道-软件
To stop receiving these emails, you may unsubscribe now. |
Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
留言列表