I've just started out with AppleScript and I am trying to make a "new text file" thing in Automator. I keep getting this error: "Finder got an error: Can’t make class file."
Here is my code:
tell application "Finder"
set filename to display dialog "Enter Filename" default answer "newfile"
make new file at (target of front window) with properties {name:text returned of filename, file type:text}
end tell```