SciTE functions Thread last updated on 2004-05-18 08:25:37

Posted by member 333 on 2004-05-15 01:37:46

Following up my post about this to the LSML, I would like to see some LUA functions related to LiteStep. If you don't know what I'm talking about, you can't help me ;p But I guess I should explain...

SciTE is a text editor, http://scintilla.org/SciTE.html, it has scripting built in, using the LUA language.

So, do any of you LS/SciTE users have some good functions that makes editing rc-files even easier?

thanks!

Posted by member 7223 on 2004-05-15 11:50:48 link

I don't know what LUA is, but I've done this (some time ago):

add this to the SciTEGlobal.properties:
import litestep


Now, create the "litestep.properties" file:
# Define SciTE settings for Assembler files (IA32 MASM and NASM)
# Originally by Black Horus blackhorus@gmx.net 2002
# Updated by Kein-Hong Man mkh@pl.jaring.my 2003-10

# Masm files
file.patterns.asm=*.rc;*.mz
filter.asm=Litestep configuration files|$(file.patterns.asm)|

lexer.$(file.patterns.asm)=asm



# litestep 0.24.7RC1
litestep=otsmajorversion otsminorversion themename themeauthor configdir \
lsimagefolder lsnoshellwarning lssetasshell include \
tilewindowsh tilewindowsv cascadewindows minimizewindows restorewindows gather \
unloadmodule reloadmodule execute run about none recycle reload refresh logoff shutdown switchuser quit confirm alert clearlog

# netloadmodule-2.3
netloadmodule=\
netloadmodulesite netloadmodulepath netloadmoduledocpath netloadmodulezippath netloadmodulealiasfile netloadmodulealwaysusefolders \
netloadmodulenodownloadstep netloadmodulenoinstallstep netloadmodulenoloadstep \
netinstallmodule netloadmodule netloadmoduletestmessage netloadmoduleonload netloadmoduleonfail \
netreloadmodule netunloadmodule netuninstallmodule netloadmodulebatch

# mzscript-0.9-beta_12
mzscript=\
mzscriptfile mzvarfile mzscriptusestep mzbangchar mzlistseparator mzautosavevars mznostartonrefresh \
varset varremove varshow varrun varadd varmul varmod varint varrnd varsaveall vardump \
ifexist ifnexist ifeq ifneq ifeval \
msgbox exec setlistsep scriptremove pause \
script exec start bang exec exit label goto gotoif

# jdesk-0.73
jdesk=\
jdeskworkarea jdesksetworkarea jdeskresetworkarea jdeskdesktopfolder jdeskdoubleclicktime jdeskclearworkareaonexit jdeskrecycleonrezchange \
jdeskdisablembutton1 jdeskdisablembutton2 jdeskdisablembutton3 jdeskdisablembuttonx1 jdeskdisablembuttonx2 jdeskdisablemwheelscroll jdeskdisabledoubleclick \
jdeskmbutton1 jdeskmbutton2 jdeskmbutton3 jdeskmbuttonx1 jdeskmbuttonx2 jdeskmwheelscroll

# rabidvwm-1.1.1
rabidvwm=\
vwmpos vwmx vwmy vwmsize vwmwidth vwmheight vwmdesks vwmdesksx vwmdesksy \
vwmselexpand vwmdeskborder vwmusefaketrans vwmtransparent vwmconstantupdate vwmusetransblt \
vwmwincolor vwmwinbordercolor vwmwindarkcolor vwmwinlightcolor vwmwinbevel vwmwinalpha \
vwmtitlecolor vwmtitlebordercolor vwmtitledarkcolor vwmtitlelightcolor vwmtitlebevel \
vwmbackcolor vwmbackbordercolor vwmbackdarkcolor vwmbacklightcolor vwmbackbevel vwmbackalpha \
vwmflashcolor vwmflashbordercolor vwmflashdarkcolor vwmflashlightcolor vwmflashbevel vwmflashalpha \
vwmselcolor vwmselbordercolor vwmseldarkcolor vwmsellightcolor vwmselbevel vwmselalpha \
vwmbevel vwmbevelwidth vwmnoborder \
vwmbackbmp vwmbackborder vwmbacktile \
vwmselbmp vwmselborder vwmseltile \
vwmwinbmp vwmwinborder vwmwintile \
vwmtitlebarbmp vwmtitlebarborder vwmtitlebartile \
vwmflashbmp vwmflashborder vwmflashtile \
vwmflashtitlebmp vwmflashtitleborder vwmflashtitletile \
vwmshowicons vwmscaleicontofit vwmiconsize vwmminiconsize vwmiconborder vwmforceiconbordertop \
vwmtitlebars vwmtitlefortitle vwmtitlebarheight vwmtitlebarmod \
vwmhidetaskonswitch vwmnoswitchonfocus vwmswitchonanyfocus vwmfocustop vwmfocuslast \
vwmnogathering vwmreturntofirstscreen vwminitialdesk \
vwmmouseleft vwmmouseright vwmmousemiddle \
vwmalwaysontop vwmnoshow vwmhidden \
vwmnowrap vwmdeskspacing vwmsnapwindowondrag \
vwmhovertime vwmdetecttitlechange \
vwmnoshellflash vwmflashcount \
vwmrefreshtime vwmkeepwindowswithparent \
vwmleft vwmright vwmup vwmdown vwmdesk \
vwmgather vwmgatherlost vwmopen vwmmoveapp \
vwmreset vwmmove vwmflash vwmexec vwmsetdesks \
vwmshow vwmhide vwmtoggleontop vwmtoggle vwmtogglehidetask \
vwmaction vwmsticky \
vwmignoretitlechange vwmfix vwmsticky vwmstartwindowsondesktop \
vwmoninit vwmonquit \
vwmonmouseover vwmonmouseout vwmonhover vwmonunhover \
vwmonswitchfrom vwmonswitchto \
vwmonnewwindow vwmonremovewindow vwmontitlechange \
vwmonleftbuttondown vwmonrightbuttondown vwmonmiddlebuttondown \
vwmonleftbuttonup vwmonrightbuttonup vwmonmiddlebuttonup \
vwmonmousemove \
vwmonrepaint \
vwmonmovewindow vwmonsizewindow vwmonflash \
vwmloadinbox vwmloadboxhook \
monitornames vwmonmonitor vwmswitchmonitor

# tasks-0.92b3
tasks=tasksx tasksy tasksheight taskswidth tasksspacingx tasksspacingy \
tasksdirection taskswrapdirection taskswrapcount tasksmaxtiles \
tasksdockwindow tasksdragdistance taskssettimer tasksiconsize tasksdisplay taskszorder taskstransparency \
tasksmbutton1 tasksmbutton2 tasksmbutton3 .syspopup \
tasksemptycmd tasksautoarrange taskshideminappbar tasksmoveall tasksnohints tasksnoicons \
tasksnominimizeonclick tasksnomove taskssort tasksstarthidden \
taskstitles taskstitleminimized taskstitleselected \
tasksusewindowssettings tasksusesystemhook \
tasksboxhook tasksgather taskshide tasksmove tasksshow tasksswitch taskstoggle \
tasksminimize tasksmaximize tasksrestore \
tasksadd tasksclass tasksicon tasksignore taskspix taskswrapcmd \
tasksiconx tasksicony taskspixx taskspixy \
tasksbgcolor tasksdarkcolor taskslightcolor tasksbgimage \
taskstitlex taskstitley taskstitleheight taskstitlewidth \
taskstitleiconx taskstitleicony taskstitlepixx taskstitlepixy \
taskstitlefontsize taskstitlefont \
taskstitlefontcolor taskstitlebgcolor taskstitledarkcolor taskstitlelightcolor \
taskstitlealigncenter taskstitleitalicize taskstitlenoellipsis taskstitleunderline \
taskshighlightminimized \
tasksminiconx tasksminicony tasksminpixx tasksminpixy \
tasksminbgcolor tasksmindarkcolor tasksminlightcolor tasksminbgimage \
taskstitleminx taskstitleminy taskstitleminheight taskstitleminwidth \
taskstitleminiconx taskstitleminicony taskstitleminpixx taskstitleminpixy \
taskstitleminfontsize taskstitleminfont taskstitleminfontcolor \
taskstitleminbgcolor taskstitlemindarkcolor taskstitleminlightcolor \
taskstitleminaligncenter taskstitleminitalicize taskstitleminnoellipsis taskstitleminunderline \
taskshighlightselected \
tasksseliconx tasksselicony tasksselpixx tasksselpixy \
tasksselbgcolor tasksseldarkcolor taskssellightcolor tasksselbgimage \
taskstitleselx taskstitlesely taskstitleselheight taskstitleselwidth \
taskstitleseliconx taskstitleselicony taskstitleselpixx taskstitleselpixy \
taskstitleselfontsize taskstitleselfont taskstitleselfontcolor \
taskstitleselbgcolor taskstitleseldarkcolor taskstitlesellightcolor \
taskstitleselaligncenter taskstitleselitalicize taskstitleselnoellipsis taskstitleselunderline

# taskbar3-0.306_alpha-3
taskbar=taskbarx taskbary taskbarwidth taskbarheight taskbarmaxtaskwidth \
taskbaralwaysontop taskbarstarthidden \
taskbardisableflashing taskbaruserealflashing taskbarrefresh \
taskbarbuttondirection taskbarmaxbuttoncount taskbarusetooltips taskbarnoskinshift taskbarnofontshift \
taskbarborder taskbarbuttonborder taskbarbuttonfontborder taskbarspacing \
taskbariconshow taskbariconx taskbaricony taskbariconsize taskbarusehueing taskbarhuecolor taskbarhueintensity taskbarusesaturation taskbarsaturationintensity \
taskbarback taskbarnormalback taskbaractiveback taskbarminimizedback taskbarflashingback \
taskbarfore taskbarnormalfore taskbaractivefore taskbarminimizedfore taskbarflashingfore \
taskbarfore2 taskbarnormalfore2 taskbaractivefore2 taskbarminimizedfore2 taskbarflashingfore2 \
taskbarskincenter taskbarnormalskincenter taskbaractiveskincenter taskbarminimizedskincenter taskbarflashingskincenter \
taskbarskinleft taskbarnormalskinleft taskbaractiveskinleft taskbarminimizedskinleft taskbarflashingskinleft \
taskbarskinright taskbarnormalskinright taskbaractiveskinright taskbarminimizedskinright taskbarflashingskinright \
taskbarfontshow \
taskbarnormalfontface taskbaractivefontface taskbarminimizedfontface taskbarflashingfontface \
taskbarnormalfontheight taskbaractivefontheight taskbarminimizedfontheight taskbarflashingfontheight \
taskbarnormalfontbold taskbaractivefontbold taskbarminimizedfontbold taskbarflashingfontbold \
taskbarnormalfontitalic taskbaractivefontitalic taskbarminimizedfontitalic taskbarflashingfontitalic \
taskbarnormalfontunderline taskbaractivefontunderline taskbarminimizedfontunderline taskbarflashingfontunderline \
taskbarnormalfontcolor taskbaractivefontcolor taskbarminimizedfontcolor taskbarflashingfontcolor \
taskbarusefontshadow \
taskbarfontshadowcolor taskbarnormalfontshadowcolor taskbaractivefontshadowcolor taskbarminimizedfontshadowcolor taskbarflashingfontshadowcolor \
taskbarfontshadowoffsetx taskbarnormalfontshadowoffsetx taskbaractivefontshadowoffsetx taskbarminimizedfontshadowoffsetx taskbarflashingfontshadowoffsetx \
taskbarfontshadowoffsety taskbarnormalfontshadowoffsety taskbaractivefontshadowoffsety taskbarminimizedfontshadowoffsety taskbarflashingfontshadowoffsety \
taskbarhorizontalfontalign taskbarnormalhorizontalfontalign taskbaractivehorizontalfontalign taskbarminimizedhorizontalfontalign taskbarflashinghorizontalfontalign \
taskbarverticalfontalign taskbarnormalverticalfontaligntaskbaractiveverticalfontalign taskbarminimizedverticalfontalign taskbarflashingverticalfontalign \
taskbarnoflash taskbarremove taskbaradd taskbarhide taskbarhidetasks \
taskbarlbuttondown taskbarrbuttondowntaskbarmbuttondown taskbarlbuttonup taskbarrbuttonup taskbarmbuttonup \
taskbartbutton .select .menu .close2 \
taskbaronadd taskbarondel taskbaronflashstart taskbaronflashstop \
taskbarhide taskbarshow taskbartoggle taskbarsize taskbarmove taskbarmoveby taskbarboxhook \
taskbarlines taskbarshrink taskbargrow \
taskbarhidetasks taskbarshowtasks taskbartoggletasks taskbarswitch taskbarshowpart

# popup2-2.1.6
popup=hotlistname \
popuptitlealignment popuptitleheight popuptitlecolor popuptitlebgcolor popupgradienttitle \
popupfoldercolor popupselfoldercolor popupfolderbgcolor popupselfolderbgcolor popupfolderpix popupselfolderpix popupgradientfolder \
popuparrowimage popupselarrowimage popupnofolderarrow \
popupentryalignment popupentrycolor popupentrybgcolor popupselentrycolor popupselentrybgcolor popupgradiententry \
popupbevellightcolor popupbeveldarkcolor popupnobevel popupnomenubevel \
popupentryfontface popupfontface popupfontheight popupselentryfontface popupselentryfontheight popupfolderfontface popupfolderfontheight \
popupentrybold popupselentrybold popupfolderbold popupselfolderbold popuptitlebold \
popupentryitalic popupselentryitalic popupfolderitalic popupselfolderitalic popuptitleitalic \
popupentryunderline popupselentryunderline popupfolderunderline popupselfolderunderline popuptitleunderline \
popupentryshadowdepth popupselentryshadowdepth popupfoldershadowdepth popupselfoldershadowdepth popuptitleshadowdepth \
popupentryshadowcolor popupselentryshadowcolor popupfoldershadowcolor popupselfoldershadowcolor popuptitleshadowcolor \
popupgradientselentry popupgradientselfolder \
popupsubmenuheight popuptitlepix popupentrypix popupselentrypix popupseparatorpix popupbottompix popupblt popuppaintmode \
popupborderleft popupbordertop popupborderright popupborderbottom \
popupnottransparent popupadaptivewidth popupminwidth popupmaxwidth \
popupoverlapx popupoverlapy popuptextoffset popupmenudelay popupfolderhoveropen popupnotitles \
popupicons popupiconsonright popupdefaulticon popupfoldericon popupiconspacing popupiconsize \
popupdatetimealign popupautoseparator popupshowextension popuptaskswindowcaption popupscrollspeed \
popupentryfontheight \
popupnoclosebutton pinnedpopupnotontop popupnotitletext popuptasksstartpinned \
popup popupfolder dynamicfolder popupdynamicfolder popupimage separator popuptasks popuprun \
remoteamp datetime popupmycomputer popupnetwork popupcontrolpanel popupprinters popuprecyclebin popuprecentdocuments popupdesktops

# timer-0.5
timer=timer timerstart timerstop timerkill timeradd timerupdate timerremove

# one-0.6
one=one .none .focus .minimize .maximize .restore .close .hide .show

# lsxcommand-1.8.5
command=commandx commandy commandoffsetx commandoffsety commandwidth commandheight \
commandnotalwaysontop commandhiddenonstart commandwaitforbox commandnotmoveable commandnocursorchange \
commandbevelborder commandbordersize commandbottombordersize commandtopbordersize commandleftbordersize commandrightbordersize commandbordercolor \
commandtextfontface commandtextsize commandtextbold commandtextitalic commandtextunderline commandtextcolor \
commandbgcolor commandbackground commandstretchbackground commandtransparenteditbox \
commandexplorepaths \
commandhistoryfile commandclearhistoryonstartup commandunixhistory commandhistoryentries commandnewesthistoryitemsontop commandhistorymenuentries commandaddexternalstohistory \
commandassumenetaddress commandsearchenginelist commandsearchenginebrowser \
commandmusicplayer commandscrollwinamptitle commandwinampdisappearsonfocus \
commandcontextmenustandarditems commandcontextmenuabovebox commandcontextmenuexecute commandcontextmenuorder commandcontextmenuautopopup \
commandnowarnonerror commandhideoncommand commandselectallonfocus commandselectallonmousefocus \
commandhideonunfocus commandonfocus commandonunfocus commandnoclearoncommand commandclearonhide \
commandtime commandclockdisappearsonfocus \
commandnotabmicrocomplete commandtabfilecomplete commandnoautocomplete \
commandcommadelimiter commandrpncalculator \
togglecommand focuscommand commandrescanengines commandclearhistory commandshowcontextmenu command \
commandshow commandhide commandbrowsefile commandbrowsefolder commandmove commandtoggletimer commandsettext commandboxhook

# geekamp-1.9.71
amp=winampstartnormal winamppath winampinipath winampstartoldsetting \
loadfilenotopen playnotopen playpausenotopen prefsnotopen playlistnotopen shownotopen librarynotopen \
amp_play amp_pause amp_playpause amp_stop amp_stopfade amp_next amp_prev \
amp_volumeup amp_volumedown \
amp_loadfile amp_loaddir amp_openloc amp_addsong \
amp_moveposition amp_rew amp_rewd5s amp_rewd10s amp_rewd20s amp_ffwd5s amp_ffwd10s amp_ffwd20s \
amp_eq amp_playlist amp_library amp_video amp_togglebrowser amp_prefs amp_editid3 amp_fileinfo amp_mainmenupopup \
amp_ontop amp_show amp_hide amp_display amp_windowshade amp_shadeplaylist amp_shadeboth amp_doubesize amp_easymove \
amp_setvolume amp_setpanning amp_liststart amp_listend amp_jumptotime amp_jumptofile amp_jump10forward amp_jump10back \
amp_repeat amp_shuffle amp_timeelapsed amp_timeremaining \
amp_loadeqpreset amp_startplugin amp_pluginsetup amp_vissetup amp_selectskin amp_reloadskin \
amp_power amp_poweron amp_poweroff amp_restart amp_about amp_ls2k\

# lswchanger-1.2
wallpaper=wallpaperselectmethod normal sorted random \
wallpaper .tile .center .stretch .change .clear .mix .sort

# skinbox-1.0-beta_4.1
skinbox=skinbox skinboxmove skinboxsize skinboxontop skinboxalpha skinboxshow \
skinboxcreate skinboxdestroy skinboxloadboxhook skinboxexec skinboxaction \
skinboxbitmap skinboxedge skinboxtile skinboxcolor \
create destroy mouseover mouseout mousemove hover unhover \
lbuttondown rbuttondown mbuttondown lbuttonup rbuttonup mbuttonup \
lbuttonclick rbuttonclick mbuttonclick ondropfile ondropurl ondroptext

# layercut-1.72
layercut=shortcutdefaultalpha shortcutalphathreshold shortcutnoloadingonstartup shortcutsoundsync shortcutnodisplaychange shortcutupdatepos shortcutprimarymonitor \
shortcutgroupsetalpha shortcutgroupshow shortcutgrouphide shortcutgrouptoggle shortcutgrouptoggleontop \
layercut animation image size speed flags between execution left right middle drop in out \
shortcutbox





cpu_instruction2=

fpu_instruction=

ext_instruction=

register=

directive=

directive_operand=

directive_nasm=

directive_operand_nasm=% ^$ ^@


keywords.$(file.patterns.asm)=$(litestep) $(netloadmodule) $(mzscript) \
$(jdesk) $(rabidvwm) $(tasks) $(taskbar) $(popup) $(command) $(timer) $(one) \
$(amp) $(wallpaper) \
$(skinbox) $(layercut)
keywords2.$(file.patterns.asm)=$(fpu_instruction)
keywords3.$(file.patterns.asm)=$(register)
keywords4.$(file.patterns.asm)=$(directive) $(directive_nasm)
keywords5.$(file.patterns.asm)=$(directive_operand) $(directive_operand_nasm)
keywords6.$(file.patterns.asm)=$(ext_instruction)

fold.margin.width=0
autocompleteword.automatic=0
autocomplete.*.ignorecase=1

open.dialog.in.file.directory=1
save.recent=1

# Default style
style.*.32=$(font.base) ,back:#606060,fore:#000000 {}
caret.fore=#FFFFFF
caret.line.back=#303840
selection.fore=#101010
selection.back=#c08040

# Comments
comment.block.asm=;

# Line number
style.*.33=back:#505050,$(font.base)
# Brace highlight
style.*.34=back:#282828,fore:#ffc080,bold
# Brace incomplete highlight
style.*.35=back:#282828,fore:#FF8080,bold
# Control characters
style.*.36=
# Indentation guides
style.*.37=fore:#C0C0C0,back:#FFFFFF

colour.rc=fore:#a0a0a0,bold
colour.number=fore:#a0c0d0
colour.string=fore:#d0d0ff
colour.flag=fore:#80b0c0
colour.operator=fore:#80a0c0

tabbar.visible=1
tabbar.hide.one=1
check.if.already.open=1

# Assembler Styles
style.asm.32=fore:#000000,font:Verdana,size:8
# Default
style.asm.0=$(colour.flag)
# Comment
style.asm.1=fore:#ffffff
#$(colour.code.comment.line),font:Comic Sans MS,size:8
# Number
style.asm.2=$(colour.number)
# String
style.asm.3=$(colour.string)
# Operator
style.asm.4=$(colour.operator),bold
# Identifier
style.asm.5=
# CPU instruction
style.asm.6=$(colour.rc)
#fore:#0000ff
# FPU instruction
style.asm.7=fore:#0000ff
# Register
style.asm.8=fore:#46aa03,bold
# assembler Directive
style.asm.9=fore:#0000ff
# assembler Directive Operand
style.asm.10=$(colour.flag)
# Comment block (GNU as /*...*/ syntax, unimplemented)
style.asm.11=$(colour.code.comment.box),$(font.code.comment.box)
# Character/String (single quote) (also character prefix in GNU as)
style.asm.12=$(colour.string)
# End of line where string is not closed
style.asm.13=$(colour.string)
# Extended instructions
style.asm.14=fore:#B00040

Posted by member 333 on 2004-05-16 09:58:26 link

wow, that's a pretty extensive syntax list you've made there. Will be helpful, thanks.

Posted by member 7223 on 2004-05-17 06:21:23 link

humm... it needs an update :(

Posted by member 12798 on 2004-05-17 09:23:26 link

can i use this with alphaedit3, too? because its highlighting is a bit screwed sometimes... after a !bang, everything has the colour given to the bang, and since bangs are what you use the most in scripts, there's not really any syntax highlighting left... :/

Posted by member 333 on 2004-05-18 08:25:37 link

ElkMonster, I'm not familiar with alphaedit3, unfortunately, but you can probably cut'n'paste the syntax. hmmm... come to think of it, ae3 is based on Scintilla, too, isn't it? Then maybe you can just use all of that stuff..

Smurth: Yes, it does need a little updating, but it works pretty much as you'd expect. I've removed the global SciTE-stuff though (under #default style, caret.line.back, etc...). But when that was done, it was all a matter of configuring the syntax colours to my liking. Thanks again.