x-espresso URL Scheme
You can use the custom URL scheme
x-espresso://open to create links that will automatically open a file in Espresso and optionally select particular lines and/or ranges. This is typically most useful in plug-ins that validate or otherwise parse files, but can be used anywhere on the system that you can activate a link.
To open a file, you must include up to three query variables:
filepath(required): the path to the file you wish to open
lines: a list of lines (or line ranges) you wish to select
ranges: a list of ranges you wish to select
For instance, to simply open a file:
To select one or more lines list the line numbers separated by commas (,), or use a range of lines denoted with a hyphen:
The above example will select line 4, and lines 10-15.
Or you can select one or more specific ranges in the form "index,length" where "index" is a zero-based character count from the start of the document; multiple ranges are separated by plus signs (+):
The above example will select ten characters starting at index 1 (the second character in the document, since it is a zero-based index), and two characters starting at index 15.
You can also mix and match line selection and ranges if you wish.