Posts

Post not yet marked as solved
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
264 Views
I have an AppleScript that generates on outgoing email message in Mail using the contents of the clipboard. When I use the command: set theContent to the clipboard and then make a new outgoing message with properties including content:theContent, Applescript changes the single spacing to double spacing. In other words it replaces every \n with \n\n. If I just manually paste the clipboard into a new email message, it uses the single spacing. When I use the Show Clipboard command in the Finder menu to look at the clipboard it has single spacing. If I have the script return theContents it shows it as having double spacing. Can anyone suggest an explanation or cure for this behavior? Thanks.
Posted Last updated
.