Posts

Showing posts with the label scite

Style Scite with Lua?

Image
Style Scite with Lua? I would like to style Scite, so it starts up with whatever is the default style - but then I would want to change to a different style to a dark one by running a command. So, after some digging, I got to this script in sciteLuaFunctions.lua which I mapped to a command in Tools menu: sciteLuaFunctions.lua -- http://scite.ruteam.ru/archive/1.59 local function encodeRGB(color) if string.sub(color,1,1)=="#" and string.len(color)>6 then return tonumber(string.sub(color,6,7)..string.sub(color,4,5)..string.sub(color,2,3), 16) else return color end end function ChangeToDarkTheme() -- http://www.scintilla.org/PaneAPI.html -- http://www.scintilla.org/SciTEFAQ.html " How do I change SciTE to use black as the background colour?" -- http://www.scintilla.org/SciTEDoc.html -- color calculation works like this: --~ mycolorRGB = { r = 100, g = 100, b = 100 } -- ok --~ mycolor = (mycolorRGB.r+(mycolorRGB.g*2...