Last active
January 24, 2016 16:34
-
-
Save digiltd/4fc8ff4b7a0a1b2029c7 to your computer and use it in GitHub Desktop.
Display Tunnelblick configuration in 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