In get facetime link SEE TEXT IN CAPS. Examine get new facetime link for the same robustness.
ell application "System Events"
tell process "FaceTime"
--Open sidebar
repeat with buttonEl in buttons of window 1
if (exists attribute "AXIdentifier" of buttonEl) and (value of attribute "AXIdentifier" of buttonEl = "toggleSidebarButton") then
click buttonEl
end if
end repeat
--Wait for sidebar to open
delay 1 BETTER TO REPEAT TEST FOR EXIST SIDE BAR BUTTON
--Clear the clipboard
set the clipboard to ""
--Click "share link" button BETTER TO INCLUDE THIS IN REPEAT SECTION BELOW IN CASE THE CLICK DIDNT GO
set linkButton to button 2 of last group of list 1 of list 1 of scroll area 2 of window 1
click linkButton
delay 0.1
click menu item 1 of menu of linkButton
repeat
if the clipboard is not ""
return the clipboard as string
end if
delay 0.1
end repeat
end tell
In get facetime link SEE TEXT IN CAPS. Examine get new facetime link for the same robustness.
ell application "System Events" tell process "FaceTime" --Open sidebar repeat with buttonEl in buttons of window 1 if (exists attribute "AXIdentifier" of buttonEl) and (value of attribute "AXIdentifier" of buttonEl = "toggleSidebarButton") then click buttonEl end if end repeat
end tell