Scripting (Expert)
Scripts are Lua 5.5 files in the scripts folder; each appears in Tools > Scripts. startup.lua
runs when the first Expert window opens, after the plugins' Lua, and Tools > Scripts > Reload Scripts
starts both again. The Lua console (View > Panels > Lua Console) runs statements, and = expression
prints a value.
editoris the Scintilla API of the current view, with SciTE-compatible names:editor:GotoLine(10),editor:ReplaceSel("x"),editor:AddText("text"), properties such aseditor.CurrentPosandeditor.LineCount, and indexed properties such aseditor.LineEndPosition[line]oreditor.StyleBold[style] = true. Helpers:GetText,SetText,GetSelText,GetLine(n),TextRange(a, b).tripadis the application:message(text),alert(text),prompt(title, default),output(...),open(path),new(text),save(),command("Line.SortAsc"),mode(),setMode("expert"),filePath(),fileName(),language(),setLanguage("python"),encoding(),clipboard(),setClipboard(text),documents(),dataDir(),version(),register(name, function)to add a Tools > Scripts entry, andon(event, function)for the"open","save"and"switch"events.
Command names for tripad.command are listed in the Command Id column of the Keyboard Shortcuts
editor (Tools > Keyboard Shortcuts), for example File.Save, Edit.Copy or Compare.Next.