Lua: error checking global scope for command 'make_uppercase'
Jim Eggleston <[email protected]> Tue, 3 Mar 2026 15:29:17 -0800 (PST)
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_17920_2019628608.1772580557509
Content-Type: multipart/alternative;
boundary="----=_Part_17921_1263903211.1772580557509"
------=_Part_17921_1263903211.1772580557509
Content-Type: text/plain; charset="UTF-8"
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.
--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scite-interest/8763dd05-9da5-49b5-bca4-27318386ee84n%40googlegroups.com.
------=_Part_17921_1263903211.1772580557509
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I have been having trouble getting functions defined in a Lua startup scrip=
t to be recognised. The error I am getting is in the subject line. I have b=
een 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 thi=
s working.<div><br /></div><div>SciTE version 5.6.0</div><div>OS: Windows 1=
1</div><div><br /></div><div>Script: make_uppercase.lua, which is saved in =
the SciTE directory i.e. $(SciteDefaultHome)</div><div><br /></div><div>fun=
ction make_uppercase()<br />=C2=A0 =C2=A0 print("make_uppercase")<br />=C2=
=A0 =C2=A0 local sel =3D editor:GetSelText()<br />=C2=A0 =C2=A0 editor:Repl=
aceSel(string.upper(sel))<br />end</div><div><br /></div><div>In the SciTEG=
lobal.properties I have:</div><div>ext.lua.startup.script=3D"$(SciteDefault=
Home)/make_uppercase.lua"<br />ext.lua.directory=3D"$(SciteDefaultHome)"<br=
/>ext.lua.auto.reload=3D1<br /></div><div><br /></div><div>command.name.3.=
*=3DMake Selection Uppercase<br />command.subsystem.3.*=3D3<br />command.3.=
*=3Dmake_uppercase<br />command.mode.3.*=3Dsavebefore:no<br />command.short=
cut.3.*=3DCtrl+M</div><div><br /></div><div>When I open another file and pr=
ess 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.</div><div><br /></div><di=
v>I would appreciate any help anyone can offer.</div><div><br /></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;scite-interest" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">scit=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
scite-interest/8763dd05-9da5-49b5-bca4-27318386ee84n%40googlegroups.com?utm=
_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/scit=
e-interest/8763dd05-9da5-49b5-bca4-27318386ee84n%40googlegroups.com</a>.<br=
/>
------=_Part_17921_1263903211.1772580557509--
------=_Part_17920_2019628608.1772580557509--