I have been having trouble getting functions defined in a Lua startup script to be recognised. The error I am getting is in the subject line. I have been doing my best to look for solutions and as far as I can tell, my set up is correct. Here are the details of what i am doing so far. This is just a simple test script. I am hoping to do something more useful once I get this working.
SciTE version 5.6.0
OS: Windows 11
Script: make_uppercase.lua, which is saved in the SciTE directory i.e. $(SciteDefaultHome)
function make_uppercase()
print("make_uppercase")
local sel = editor:GetSelText()
editor:ReplaceSel(string.upper(sel))
end
In the SciTEGlobal.properties I have:
ext.lua.startup.script="$(SciteDefaultHome)/make_uppercase.lua"
ext.lua.directory="$(SciteDefaultHome)"
ext.lua.auto.reload=1
command.name.3.*=Make Selection Uppercase
command.subsystem.3.*=3
command.3.*=make_uppercase
command.mode.3.*=savebefore:no
command.shortcut.3.*=Ctrl+M
When I open another file and press Ctrl+M, i get the message in the subject line. I feel like I am missing something simple but cannot work out what it is.
I would appreciate any help anyone can offer.