I have a script
tell application "QuickTime Player"
set current time of document "Promised Land" to 4000000
set current time of document "U.S. Blues" to 1000000
set current time of document "Glendale Train" to 300000
end tell
but if US Blues is not open, an error ocures and Glendale Train is not set.
Putting the whole routine inside one try…end try has the same effect. Hence my current script:
tell application "QuickTime Player"
try
set current time of document "Promised Land" to 4000000
end try
try
set current time of document "U.S. Blues" to 1000000
end try
try
set current time of document "Glendale Train" to 300000
end try
end tell
Is there a cleaner/neater/easier way to do this? A “ignore errors, go to next line”…“end ignore errors” construction?
I’m not asking for a clever feature of QuickTime Player, but about AppleScript error handling.
Thank you.