lua-users home
lua-l archive

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


Gavin Wraith wrote:
> I have just joined a larger slice of the human race by getting
> myself a tiny notebook with Windows XP. I have downloaded SciTE
> to use as a text editor, because I believe it can be configured
> using Lua. Naturally I would like to configure it to provide
> facilities with which I have for many years been familiar
> using the StrongED text editor under RISC OS. One of them is
> the facility to doubleclick on a URL in a text file to cause
> a browser to open that URL. How would I go about adding that
> facility to SciTE? All advice from those more familiar with
> Windows XP and with SciTE will be gratefully received.

Sorry OT, but this works pretty well:

  command.name.1.*=Open URL in Browser
  command.1.*=<browserpath> $(CurrentSelection)
  command.subsystem.1.*=1
  command.mode.1.*=savebefore:no
  command.shortcut.1.*=Ctrl+'

Substitute <browserpath> with the appropriate browser. I tested
with "d:/Programs/FirefoxPortable/FirefoxPortable", seems okay.

Using the SciteOpenUrl Lua script on WinXP unfortunately flashes a
console window due to os.execute(), but the following substitution
in the SciteOpenUrl Lua script sorta works:

  os.execute([[<browserpath> ]]..txt.." ")

where <browserpath> is the appropriate browser's path.

There may be other ways of doing this, because of the flexibility
and configurability of SciTE.

HTH,
-- 
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia