I don’t think that the url scheme yet supports links to particular documents or locations within them, but in the meanwhile you can, of course, call an applescript (for example from the command line, directly or indirectly) passing a filename and a line number to it.
To open test.ft and automatically select line 12, I just ran this from a shell script:
osascript OpenFTFileAtLineN.scpt ~/Desktop/FT_DIFF/Query_test/FT\ CLI/test.ft 12
Using an Applescript like:
property pjsSelectLine : "
function(editor, options) {
var tree=editor.tree(),
lngLine=options.linenum,
oNode=tree.lineNumberToNode(lngLine),
rngSeln=tree.createRangeFromLocation(oNode.lineTextStart(), oNode.line().length);
//debugger;
tree.ensureClassified();
editor.scrollToLine(lngLine);
editor.setSelectedRange(rngSeln);
return true;
}
"
on run argv
if class of argv = list then
OpenFile(item 1 of argv)
GotoLine(item 2 of argv)
end if
end run
on OpenFile(strUnixPath)
tell application "FoldingText"
activate
set varOpened to open strUnixPath
end tell
end OpenFile
on GotoLine(varLine)
tell application "FoldingText"
activate
tell front document
return evaluate script pjsSelectLine with options {linenum:varLine as integer}
end tell
end tell
end GotoLine