From the small pictures and without the source code, diagnosis is difficult.
For me, under Big Sur scripts and apps have more problems than before, i.e. with Mojave. Random errors, once given authorizations disappear.
As much as I love Macrumors, here maybe macscripter.net may be a better place, with the great people of Script Debugger around.
I understand. I am also suspecting that it is OS11. And Apple never gives support on Apple Scripts. I tried to get info if there are tricks or things to observe in general to no avail.
Here a sample of a code (a simple one) that also does not run. Normally the message after the Ping part and the OK are not there, I added those for testing.
-- check if network is up
repeat
try
set pingRequest
to do shell script "/sbin/ping -c6 google.com"
if pingRequest
contains "0% packet loss"
then exit repeat -- This will run the ping until there's no packet loss.
on error
beep
delay 10
end try
end repeat
display dialog "Finished checking - Network is up and running" buttons {"OK"} default button "OK" giving up after 6
delay 3
say "OK"
-- end
set theBody
to "Text"
set theSubject
to "Text"
set theTarget
to "<
name@yahoo.com>"
tell application "Mail"
set newMessage
to make new
outgoing message with properties {subject:theSubject, content:theBody}
tell newMessage
make new
to recipient at
end of to recipients with properties {address:theTarget}
set sender
to "<
sender@yahoo.com>"
end tell
send newMessage
end tell
delay 2
tell application "System Events"
set visible
of (
every process whose visible
is true)
to false
set visible
of process "Finder"
to true
end tell
Now I have also tested this with a timeout of 3600 and that makes not difference either.
Suggestions anybody?