Terminology change on CotEditor 4.1.0
jump
A new command jump was added to the ‘document’ object.
Support encodings with BOM
A new property has BOM was added to the ‘document’ object.
A new option BOM was added to the convert command.
This page lists up the previous specific changes on AppleScript support in CotEditor.
A new command jump was added to the ‘document’ object.
A new property has BOM was added to the ‘document’ object.
A new option BOM was added to the convert command.
convert / reinterpretNow convert and reinterpret commands accept the encoding also in the IANA charset name.
The following new commands were added to the ‘selection’ object.
smarten quotesstraighten quotessmarten dashesview opacity property was deprecated on CotEditor 3.5.0.
Please note that there is no backward compatibility with this change.
A new property expands tab was added to the ‘document’ object.
line spacing property was deprecated on CotEditor 2.6.0.
Please note that there is no backward compatibility with this change.
A new value Modified NFC was added to the normalize unicode command.
The following new commands were added to the ‘selection’ object.
move line upmove line downsort linesreverse linesdelete duplicate lineA new value Modified NFD was added to the normalize unicode command.
A new value NFCK Casefold was added to the normalize unicode command.
A new property tab width was added to the ‘document’ object.
New commands comment out and uncomment were added to the ‘selection’ object.
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 change.
path propertyThe 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 backward 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 migrating your previous scripts to use file property. Because this `path` property can be removed someday in the future without announcement.
range propertyThe internal code for range property of the 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 updates for this change.
Open your .scpt files on AppleScript Editor (or Script Editor), the words that were 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).
According to the changing of the mechanism to make the window transparent on CotEditor 1.5, the terms about window opacity for AppleScript were also changed. The document’s properties till on version 1.4:
transparency: The transparency of Window or TextView. (real, from ‘0.2’ to ‘1.0’)alpha only textView: Whether the transparency setting affects only the TextView or not. (boolean)were deprecated, and the new window’s property:
view opacity: The opacity of the view. (real, from ‘0.2’ to ‘1.0’)was added instead.
Because 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 change.
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 actually didn’t work correctly and therefore deprecated. This method was kept valid however to maintain backward compatibility.
On CotEditor 1.5, it is formally removed. Specify the target like below, when you get the ‘selection’ object.
tell application "CotEditor"
contents of selection of front document
end tell
tell application "CotEditor"
tell document 1
contents of selection
end tell
end tell