Post not yet marked as solved
Post marked as unsolved with 1 replies, 260 views
The Applescript documentation includes the following example:
Listing 15-14AppleScript: Coercing a string to an alias
set theFilePath to "Macintosh HD:Users:yourUserName:Desktop:My File.txt"
set theFilePath to theFilePath as alias
When I try to run the following script on my iMac running Big Sur 11.5.2
tell application "Finder"
activate
set theFilePath to "InternalDrive:Users:Shared:Previously Relocated Items:Security:Photos & Scans:BakerFamily:ArmyFence.psd"
set theFilePath to theFilePath as alias
end tell
return theFilePath
I get to following error message:
error "Can’t make "InternalDrive:Users:Shared:Previously Relocated Items:Security:Photos & Scans:BakerFamily:ArmyFence.psd" into type alias." number -1700 from "InternalDrive:Users:Shared:Previously Relocated Items:Security:Photos & Scans:BakerFamily:ArmyFence.psd" to alias
Am I doing something wrong or has something changed? I have also noticed that Applescripts I used routinely to change to labels on files until a month or so ago now no longer work.