From e179bf752d4fa066f0ff0aea71b78644e23fb762 Mon Sep 17 00:00:00 2001 From: thamaraiselvam Date: Thu, 3 Oct 2019 15:23:00 +0530 Subject: [PATCH 1/2] bug fix: error occured when try to connect already connected VPN --- lazy-connect | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lazy-connect b/lazy-connect index 34abb7e..afc8e2f 100755 --- a/lazy-connect +++ b/lazy-connect @@ -145,7 +145,9 @@ function _lazy_connect() { delay 1 tell group 1 - click button "Connect" + if button "Connect" exists then + click button "Connect" + end if end tell end tell From 3ac4707c92615e858904256412e3136f85d8f1c1 Mon Sep 17 00:00:00 2001 From: thamaraiselvam Date: Fri, 4 Oct 2019 17:31:59 +0530 Subject: [PATCH 2/2] =?UTF-8?q?Can=E2=80=99t=20get=20button=20Authenticati?= =?UTF-8?q?on=20Settings=20issue=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lazy-connect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lazy-connect b/lazy-connect index afc8e2f..7ff7429 100755 --- a/lazy-connect +++ b/lazy-connect @@ -95,7 +95,7 @@ function _lazy_connect_get_totp() { function _lazy_connect() { vpn_name=$1 - osx_vpn_name="${vpn_name/Connect /}, Not Connected" + osx_vpn_name="${vpn_name/Connect /}" _lazy_connect_get_totp $2 local autofill=$3 @@ -126,7 +126,7 @@ function _lazy_connect() { tell window 1 repeat with r in rows of table 1 of scroll area 1 - if (value of attribute "AXValue" of static text 1 of r as string) is equal to "$osx_vpn_name" then + if (value of attribute "AXValue" of static text 1 of r as string) contains "$osx_vpn_name" then select r end if end repeat