Doc Poster Posted March 22, 2006 Share Posted March 22, 2006 I've searched the forums and help to no avail. I'm wanting to use SciTE to color code a language not included with it--PSL, which is PowerTerm power scripting language. I modified the global properties file to recognize the file pattern (*.psl), add it to the language and options menu, and import the psl.properties file. I looked at the other properties files and created one for psl, but it won't change the colors on any psl code when I select PSL as the language; all the text is black. What am I missing? Below is the psl.properties code. expandcollapse popup# Define SciTE settings for PowerTerm Power Script Language (psl) files. # PSL: Power Script Language file.patterns.psl=*.psl filter.psl=PSL (psl)|$(file.patterns.psl) #lexer.*.psl=psl lexer.$(file.patterns.psl)=psl keywordclass.psl=append array break cd close concat continue copy-from-clipboard copy-to-clipboard cursor \ dde execute initiate poke display eof eval exec expr \ file flush for foreach format gets glob global if incr info input-line \ join key lappend lindex linsert list llength lrange lreplace lsearch lsort \ menu message open open-setup-file proc puts pwd \ read regexp regsub rename return run \ scan screen screen-rect seek send session set baud-rate comm-type parity protocol-type \ split string switch tell time unset uplevel upvar wait while window keywords.$(file.patterns.psl)=$(keywordclass.psl) comment.block.psl=#~ # PSL styles # Default style.psl.32=$(font.base) # White space style.psl.0=fore:#000000,$(font.vbs) # Block comment style.psl.1=$(colour.code.comment.box),$(font.code.comment.box) # Line comment style.psl.2=$(colour.code.comment.line),$(font.code.comment.line) # Number style.psl.4=$(colour.number) # Keyword style.psl.5=$(colour.keyword),bold # String style.psl.6=$(colour.string) # Character style.psl.7=$(colour.char) # Operators style.psl.10=$(colour.operator),bold # Identifiers #style.psl.11= # Braces are only matched in operator style braces.psl.style=10 command.help.$(file.patterns.psl)=$(CurrentWord)!c:\ptw\ptw32.hlp command.help.subsystem.$(file.patterns.psl)=4 Link to comment Share on other sites More sharing options...
flyingboz Posted March 22, 2006 Share Posted March 22, 2006 I know nothing about the language you are attempting to code. Suggestions for how to proceed. Look for languages that are syntactically similar to the one you are trying to get color coding for - try switching your source code into various languages and see how it looks. If nothing is similar enough , google +scite +lexer , and enjoy the fun of writing your own customized lexer. Valik (IIRC) wrote a dll module enabling a greater ease of use in writing lexers that integrate w/ scite. Our fearless scite integrator (y'all know who he is has provided a ton of source wrt LUA and the scite .properties files. All the best in your efforts. Oh, and get Kermit instead of that powerlessterm nonsense Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 22, 2006 Developers Share Posted March 22, 2006 here's what you need to do:Save your specified definition file as psl.properties in the SciTE directory, but first select an existing Lexer of a language that is similar to psl. something like lexer.$(file.patterns.psl)=vbAdd this line at the end of SciTEGlobal.properties: import pslThat should do it for you... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valik Posted March 22, 2006 Share Posted March 22, 2006 Valik (IIRC) wrote a dll module enabling a greater ease of use in writing lexers that integrate w/ scite.All I did to SciTE was change around a couple lines to allow external lexers to be loaded which was just exposing some Scintilla functionality in SciTE. It was hardly a substantial contribution and I never wrote anything more than a test lexer to confirm it worked. I soon found out that an external lexer was a PITA to write because it required linking against half of Scintilla which IMO didn't really make it too beneficial to create an external lexer as opposed to built-in. Besides, JdeB had already written the AutoIt lexer so I didn't need to start one of my own by this time, anyway. Link to comment Share on other sites More sharing options...
Doc Poster Posted March 22, 2006 Author Share Posted March 22, 2006 here's what you need to do:Save your specified definition file as psl.properties in the SciTE directory, but first select an existing Lexer of a language that is similar to psl. something like lexer.$(file.patterns.psl)=vbAdd this line at the end of SciTEGlobal.properties: import pslThat should do it for you...Already had the import psl command in global.properties. Tried uncommenting and setting the lexer line to vb and a few others, all to no avail. Also ran SciteConfig and had it save the default color settings to the SciTEUser.properties file and it made no difference. Seems no matter what I try, it still displays all black. Unless someone has any other ideas (isn't my properties file above correct?), I'll just have to set it to some other language and go with that. Very frustrating...Oh, and Flyingboz, I checked out Kermit. The scripting language looks even worse than PowerTerm's! But even if it wasn't, I'm doing this at work and have to stick with their programs. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 22, 2006 Developers Share Posted March 22, 2006 (edited) Already had the import psl command in global.properties. Tried uncommenting and setting the lexer line to vb and a few others, all to no avail. Also ran SciteConfig and had it save the default color settings to the SciTEUser.properties file and it made no difference. Seems no matter what I try, it still displays all black. Unless someone has any other ideas (isn't my properties file above correct?), I'll just have to set it to some other language and go with that. Very frustrating...No need to run SciTEConfig, since thats only doing something for Autoit3, or anything else...You only have to exactly follow the steps i wrote and open a file with a psl extension ...I have tried it and worked fine for me... Edited March 22, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
flyingboz Posted March 23, 2006 Share Posted March 23, 2006 RE: kermitkermit's language is syntactically unusual, and takes some getting used to - especially if you don't have any old school unix shell scripting and a passing familiarity w/ c . In its favor, however, it runs on virtually every platform known to man, and the scripting language is eminently powerful, stable , reliable and robust. My kermit scripts run in hospitals, labs, and billing offices, processing mission critical data securely and reliably. I can integrate w/ disparate partners w/ no additional cost, because kermit runs on virtually any piece of equipment known to man. I have yet to run across someone operating an incompatible environment, where I would have to provide a computer to enable them to communicate w/ me. Note that the cost of a *nix c-kermit server installation is $0.00. Windows clients are around $10.00 a seat in bulk.NASA uses these protocols and software for slapping data all over the solar system, NOAA for instruments dropped into the ocean in a hurricane's path.Full atomic transaction support, native string and screenscrape functions, s-expressions, regular expressions, floating point and date arithmetic, a wide variety of embedded variables (think au3 @ functions), as well as o/s environment and console integration...the list goes on Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now