From 4461e9462aade0ca5d280ba6b8f7c79dae7061fe Mon Sep 17 00:00:00 2001 From: rllbe Date: Wed, 17 May 2023 21:16:51 +0800 Subject: [PATCH] bypass 2fa upgrade prompt --- login3.applescript | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/login3.applescript b/login3.applescript index c89992e..c70d0a7 100644 --- a/login3.applescript +++ b/login3.applescript @@ -1,4 +1,22 @@ tell application "System Events" to tell window "Accounts" of process "Xcode" + -- bypass 2fa upgrade prompt + try + tell sheet 1 of sheet 1 + repeat with _group in (every group of group 1 of UI element 1 of scroll area 1) + if (exists button "Other options" of _group) then + click button "Other options" of _group + delay 1 + exit repeat + end if + end repeat + if (exists button "Don’t Upgrade") then + click button "Don’t Upgrade" + end if + if (exists button "Do not upgrade") then --monterey + click button "Do not upgrade" + end if + end tell + end try -- check if account exists in account list if not (exists of row 2 of table 1 of scroll area 1) then error