Skip to content

Instantly share code, notes, and snippets.

@digiltd
Last active September 1, 2015 09:21
Show Gist options
  • Save digiltd/731b04a7081705d4f0dd to your computer and use it in GitHub Desktop.
Save digiltd/731b04a7081705d4f0dd to your computer and use it in GitHub Desktop.
Load Tunnelblick configs into RemoteBuddy
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