Change log of AppleScript support

Terminology change on CotEditor 3.5.0

editor's opacity

view opacity property was deprecated on CotEditor 3.5.0.

Please note that there is no backward compatibility with this changing.

Terminology change on CotEditor 3.1.2

auto tab expansion

A new property expands tab was added to the ‘document’ object.

Terminology change on CotEditor 2.6.0

line spacing property

line spacing property was deprecated on CotEditor 2.6.0.

Please note that there is no backward compatibility with this changing.

Terminology change on CotEditor 2.5.3

Unicode normalization

A new value Modified NFC was added to the normalize unicode command.

Terminology change on CotEditor 2.3.0

Selected line editing

The following new commands were added to the ‘selection’ object.

Terminology change on CotEditor 2.2.2

Unicode normalization

A new value Modified NFD was added to the normalize unicode command.

Terminology change on CotEditor 2.2.0

Unicode normalization

A new value NFCK Casefold was added to the normalize unicode command.

Terminology change on CotEditor 2.1.0

Tab width

A new property tab width was added to the ‘document’ object.

Terminology change on CotEditor 2.0.1

Comment handling

New commands comment out and uncomment were added to the ‘selection’ object.

Terminology change on CotEditor 2.0.0

Unicode normalization

The command unicode normalization on CotEditor 1.x was renamed on 2.0 to normalize unicode. The function and parameters are the same as before.

Please note that there is no backward compatibility with this changing.

Discontinuation of path property

The path property of ‘document’ object is discontinued on the modern AppleScript’s Standard Suite for a long time. Since CotEditor adopted it on version 2.0, this property is also deprecated on CotEditor. Use new file property instead. While path property returns a text object, file property returns a file object.

For backwards compatibility, CotEditor 2.0 added a hidden path property to ‘document’ object uniquely, however do not use it if you create new scripts and we also recommend to migrate your previous scripts to use file property. Because this `path` property can be removed some day in the future without announce.

Update of internal code for range property

The internal code for range property of text selection object to identify itself has been changed on CotEditor 2.0. The key for the range property is still range, so you don’t need to care about this if you write a new script. However compiled AppleScripts (.scpt) which were written previously might need some update for this change.

How to fix:

Open your .scpt files on AppleScript Editor (or Script Editor), the words that was range previously might be changed to «class prng» or something like that. Overwrite them with range again. And save them.
This issue doesn’t occur with plain-text AppleScript (.applescript).

Terminology change on CotEditor 1.5.0

Window transparency

According to the changing of the mechanism to make window transparent on CotEditor 1.5, the terms about window opacity for AppleScripting was also changed. The document's properties till on version 1.4:

were deprecated, and the new window's property:

was added instead.

Since the previous term “transparency” was incorrectly used until version 1.4, the property name was renamed from “transparency” to “opacity” but the value to set is not changed. Namely, 1.0 means fully opaque on both properties.

Please note that there is no backward compatibility with this changing.

Selection Object direct under the Application

In version 0.6, the initial release of CotEditor, if you didn't specify the ‘selection’ object, the frontmost window's contents will be selected. But it was actually didn't work correctly and therefore deprecated. This method was kept valid however to maintain backwards compatibility.

On CotEditor 1.5, it is formally removed. Specify the target like below, when you get the ‘selection’ object.

example 1.
tell application "CotEditor"
	contents of selection of front document
end tell
example 2.
tell application "CotEditor"
	tell document 1
		contents of selection
	end tell
end tell

See also