AppleScript to open file using Finder
I have a csv file in Downloads folder. Before updating to 12.3, I used the following script to open the file:
set f1 to "MacSSD:Users:Myname:Downloads:test.csv" as string
tell application "Finder" to open f1
After the 12.3 update, the script doesn't work. It opens the Numbers app without any window. I have to tell Finder again to open the file:
set f1 to "MacSSD:Users:Myname:Downloads:test.csv" as string
tell application "Finder"
if application "Numbers" is running
open f1
else
open f1
delay 1
open f1
end if
end tell
I used the if loop to avoid duplicates in case the Numbers app is running in the background.
I like my old script. It was much simpler. Any idea why it is not working anymore?
I know that I could tell the Numbers app to open the file, but then it opens a blank document which I don't want.
Mac mini 2018 or later