KiXtart Syntax Highlighting for WordPress

As you may have noticed, I have posted some bits of KiXtart code here on my blog and the code is prettied up to be easy to read similar to an IDE.

To do this, I use a plugin for WordPress called WP-Syntax. WP-Syntax is a wrapper around a library called GeSHi that performs syntax highlighting for programming and scripting languages.

By default GeSHi supports dozens of programming languages (see their site for a full list) but it doesn’t support KiXtart. So, I wrote a custom language file for GeSHi to add support for KiXtart.

Download: geshi-kixtart.zip (ZIP - 2.61 KB)

After installing WP-Syntax, just extract kixtart.php from the above ZIP file and copy it to the /wp-content/plugins/wp-syntax/geshi/geshi directory on your WordPress server.

To include KiXtart code in a post, surround your code with <pre lang=”kixtart”> and </pre> tags.

I have submitted this language file to the GeSHi developers so hopefully it should be added as a standard language in upcoming versions of GeSHi and WP-Syntax.

Scripting Language - KiXtart

KiXtart is an easy to use scripting language that is ideal for logon scripts. I use KiXtart for the logon script at Ergotron to map network drives and printers, adjust system settings, remove unwanted programs, install standard software and more. Over the last few years, the script has grown to over 1,800 lines but still runs quickly and is fairly easy to maintain.

Periodically, I’ll post about common logon and administrative tasks that I’ve found KiXtart useful for.

Here’s an example of a simple use of KiXtart to map different network drives for different groups of users.

1
2
3
4
5
6
7
; Everyone gets a drive mapped to the "Company Documents" share
USE "X:" "\\SERVER\Company Documents"
 
; Only users in the "Finance" group get a drive mapped to the "Finance" share
IF INGROUP ("Finance")
	USE "Y:" "\\SERVER\Finance"
ENDIF