Curious auto complete

This is odd.
In Soccer (football to the rest of the world) we refer to the sidelines of the field as the “touchline.”

I’m writing a script that uses the word touchline as a variable, but I noticed that if I type it on a line by itself, ScriptDebugger autocompletes as if it’s a block.

But, when I compile it doesn’t become a block. Touchline is a variable and the end is just a stray end by itself.

This doesn’t happen with any other variable in this script and I don’t think I’ve seen it anywhere else.

Not a bug or a problem, but just a curious behavior.

→ Mac OS: 14.3.1 (23D60)
→ Script Debugger 8.0.7 (8A75)
→ SD Notary 2 2.0 (102)
→ FastScripts 3.2.7 (1767)

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

touchline
   
end



I’ve confirmed that it reproduces in my environment (SD v8.0.6 + macOS 13.6.7) as well.
It’s not that the word “touchline” has any meaning.

touchline
touchlin
touchli
touchl
touch
touc
tou
to

And even if you shorten it to “to”, it seems to compensate for “end” in the same way.

Thanks, that makes sense.

“to” can be the first word in a handler declaration.

But it doesn’t happen with “only” or “on”.

Again, not a bug, but a curiosity.

This is an unfortunate consequence of our parsing of the to AppleScript keyword. We’ll resolve this in the next maintenance release.

1 Like

A fix for this issue appears in this beta build: