I discovered that if I try to access a field in a record, e.g.:
set track_album to (|Album| of t)
And that field does not exist, AppleScript throws an error. How can I check if that field exists first? Or how to let it fail silently? (Whichever is the best practice.)
set track_album to album of (t & {album:default})
it will be set to album if it exists or default if not.
or
try
album of t
on error -1728
default
end try
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With