Newbie here,
I recently transitioned from Windows to Apple, and need someone to take me by hand and guide me through the process of how to click the "Reconnect" button (see screenshot) that appears after the 'Microsoft Remote Desktop' has been disconnected due to the MacBook going into sleep mode.
Once I got the script, I will need to find a way to either a) manually, or even better b) automatically run it whenever I resume work (emerging from sleep mode).
Anyone who can give me a hand here?
Subsequently, I adjusted my script as follows. It neither produces an error message, but unfortunately it also doesn't click the button:
try
tell application "System Events"
tell application process "Microsoft Remote Desktop" to tell window 1
click (click at {1020, 620})
end tell
end tell
end try