MacOS, Prompts preventing reconnection via Applescript

24 views
Skip to first unread message

Alex Lemaire

unread,
May 6, 2024, 10:48:53 AMMay 6
to tunnelblick-discuss
Hello!

We're having an issue with AWS giving us auth-failure on VPN reconnection (irregularly, seems to be no pattern) - so we were hopeful to just use AppleScript on a CRON task to just regularly attempt to reconnect.

```

tell application "Tunnelblick"

connect "thevpn"

end tell

```


An issue I'm facing unfortunately, is that the modal popup that appears which notes that authentication has failed, seems to prevent the script from doing its thing.  Is there a way to disable that modal, or perhaps to use AppleScript to close them somehow?


Thanks for the guidance!

Alex

Tunnelblick developer

unread,
May 6, 2024, 12:31:57 PMMay 6
to tunnelblick-discuss
There isn't anything specifically implemented by Tunnelblick to disable the modal popup or to close it using AppleScript. There are ways AppleScript itself can close windows (the popup is a window, of course), so maybe something similar to the solutions to How do I target and close a specific Terminal window in AppleScript? or AppleScript: Close all open Windows would work.

Of course, a much better solution would be to find and fix the underlying problem that is causing the auth-failures!
Reply all
Reply to author
Forward
0 new messages