Excellent example that highlights the issue Robert.RobertC wrote: ↑Sat Aug 05, 2023 10:51 amYet, that must happen during actual execution, because this works in the editor and in KM:
but fails in LC. (OK, too many parentheses, I just wanted to be very explicit).Code: Select all
tell application "Finder" set A to ":Users:robertcailliau:Doc" set B to "uments:Alphabetical:C:Chronological:1990s:19" set C to "98:1998-01-20 Salon:Salon.mov" get (creation date of file ((A&B&C) as alias)) as text end tell
It's definitely something with the way LC does AppleScript - I used your code verbatim, just changing the alias to point to a file in my Documents folder but still split over 3 lines. As you found, it works perfectly in the AppleScript script editor but produces an execution error in LC.
Simply adding Macintosh HD before :Users fixes the issue - so it's not the closing parenthesis that is the issue - I guess LC's version of AppleScript doesn't like relative paths and needs an absolute AppleScript file path - practically it may be easier to use the POSIX paths we're all used to now and use the POSIX file command I mentioned:
Code: Select all
set <appleScriptPath> to POSIX file <posixPath>
Stam