Last active
September 1, 2015 09:21
-
-
Save digiltd/731b04a7081705d4f0dd to your computer and use it in GitHub Desktop.
Load Tunnelblick configs into RemoteBuddy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set remotebuddy_list to {} | |
tell application "Tunnelblick" | |
set vpn_list to get name of configurations | |
end tell | |
repeat with i from 1 to count of vpn_list | |
set ind_configuration to item i of vpn_list | |
set end of remotebuddy_list to i | |
set end of remotebuddy_list to ind_configuration | |
end repeat | |
tell application "Remote Buddy" | |
set the_menuitems to remotebuddy_list | |
showmenu with items the_menuitems menu name "example" with return value | |
set hiddenID to result | |
set config_name to item hiddenID of vpn_list | |
say "Connecting to " & config_name | |
tell application "Tunnelblick" | |
disconnect all | |
end tell | |
tell application "Tunnelblick" | |
connect config_name | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment