lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Aug 5, 2008 at 4:59 AM, KHMan <> wrote:
> In any case, there are probably better solutions available to the
> OP, e.g. that does not flash console windows, if he chooses an
> extended version of SciTE, e.g. like Steve Donovan's version.

My strategy has been to totally avoid doing a new version ;) There are
enough SciTE versions as it is, and it's a pain to look after a new
one.  That is the main reason that I petitioned for the exposing of
the Lua libraries from SciTE.

However, cool things can be done just with extensions:

This shows how an extension DLL can actually modify the SciTE frame
itself, without any core changes, using subclassing trickery.

Anyway, to keep OT; gui.dll provides, and this little script
will open an URL on the double-clicked line:

function OnDoubleClick()
    local lno = editor:LineFromPosition(editor.CurrentPos)
    local line = editor:GetLine(lno-1)
    local url = line:match('(http://[%w_/%.]+)')
    if not url then
        url = line:match('(file://[%w_/%.:]+)')
    if url then

(The fiddling with lines comes from the fact that after a double-click
the current line is one plus the double-clicked line)

Perhaps as KHman suggests we move this to the SciTE list, since
discussions about other people's editors can be boring.

steve d.