I have figured this out, I think:

command.go.needs.*.php=constructURL
command.go.needs.subsystem.*.php=3
command.go.*.php="c:\\path\\to\\firefox.exe" $(url)
command.go.subsystem.*.php=1

This almost worked, but it seems that the variables created by the
"constructURL" Lua function were not immediately available to "go".

So I added OnOpen, OnSave and OnSwitchFile Lua functions to my
SciTEStartup.lua file which simply run:

function OnOpen()
        props['FileURL'] = constructURL()
end

This creates the property FileURL (from the value returned from my
constructURL function) in the same scope as the existing FileName et al
variables, and my "go" command simply runs:

command.go.*.php="c:\\path\\to\\firefox.exe" $(FileURL)
command.go.subsystem.*.php=1

And Bob's my cross-dressing auntie.

Now I love SciTE even more, I didn't even think that was possible...

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to