It's possible that the editor behaves differently to what normal Applescript does.
However, Keyboard Maestro (KM) also runs the script without the volume name.
In all three cases the actual source text is somehow transformed by some engine into interpretable code of some sort.
In a different life, to quote you, I also used to work with deeper-down code (was a NeXT developer for a while, then an Apple developer, but it was many decades ago).
I have no clue at what level the source code is handled. Perhaps LC has an “older” version of that engine, while both the editor and KM use a newer one which inserts the startup volume if no root volume is present.
Yet, that must happen during actual execution, because this works in the editor and in KM:
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
but fails in LC. (OK, too many parentheses, I just wanted to be very explicit).
From this I hypothesise that the problem happens quite low down, and only Mark Waddingham can tell us.
And this attempt by the Apple people to make Applescript more tolerant has in actual fact wasted a lot of time for both of us. I much prefer the old times when there were very explicit error messages and code was hard-compiled instead of semi-interpreted. I spent far less time chasing bugs. Once I wasted an entire afternoon because I had used JavaScript's “+” for string concatenation in a php program. Php produced strange results which were correct in some cases but failed in others. But never any error message.
As to the tone of my first response: it's best not to answer in haste. When I get similar answers on other forums it was usually an immediate response, by someone who had failed to take the time to read. Thus I am now taking great care to be specific.
But, together we did find the problem, and a work-around, but not a solution, which lies with the LC coding team. I'll file it as a bug.
And hope we can be friends.
The Old Rant Robert.