LScriptUtils Add-In for Visual Studio (V5/6)

Syntax highlighting, Auto completion, Code templates, Layout commandlist

An MSVC Add-In to support the development of LScripts. LScript is the scripting language integrated into NewTek's LightWave 3D™.

Download

Screenshot:

 

Installing usertype.dat for syntax highlighting

    1. Copy Msdev_dir\usertype.dat into the directory where msdev.exe is located (....\MSDev98\Bin\usertype.dat)
    2. Locate the following key in your registry (using regedit or any other registry editor):
      HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions
      This value will contain a value like the following: cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2
      Simply add the .ls extension to the end as in this example: cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;ls

Additional tools for maintaining keyword lists for different languanges:
(i.e: automatic creation of usertype.dat from different textfiles; adding new keywords)

DevFriend: (Stand-alone exe) http://www.nitrobit.com/DevFriend.htm
Keyword Merge Add-in for Visual Studio: (Source) http://codeguru.com/devstudio_macros/mergekw.shtml

 

Installing the Add-In

    1. Copy the directory 'AddIn' anywhere you like.
    2. Start Visual Studio and go to the 'Tools/Customize' menu item. The Customize dialog will appear.
    3. In the Customize dialog, go to the 'Add-ins and Macro Files' tab.
    4. Use the 'Browse' button to locate LScriptUtils.dll and make sure its checkbox is enabled
    5. Restart Developer Studio
    6. Open 'Tools/Customize' again. Now under the 'Keyboard' tab select the 'Add-Ins' category.
    7. Select 'LScriptUtilsCommand' and assing a free and easy accessible shortcut to it (don't forget to click on 'Assign')
    8. Done!

 

Using the Add-In

Auto completion:
Type some characters of a keyword, then press the shortcut.
If the word left of the cursor is the beginning of a keyword, all matching keywords are displayed in the list.
If only a single keyword matches, it will be inserted immediately.
To show all available keywords, make sure there is no alphanumeric character left to the cursor.
(i.e.: beginning of line, only tab(s), space(s), special characters like ()<>[]=...)

Code templates:
To insert a code template press the shortcut, click on the 'Templates' button and select a template from the list.

Layout Commands:
The Layout Commands list is the output from 'SaveCommandList' in Layout.
The difference to the keyword list is, that this list includes available paramters for the commands.

 

Customizing

To add your own keywords or layout commands simply edit the textfiles in the 'AddIns' directory.
To add new templates copy your code snippets (*.ls) into the 'templates' directory.

 

Visual Studio .Net

The Add-In does not work in VS .Net. If you would like to port it to VS .Net, contact me
and I'll send you the sourcecode. Check this article for infos on how to write a dual VC6/VS.NET Add-In:
http://www.codeproject.com/macro/linecount.asp

 

Related Links

LScript Pipeline

LScript User Manual / Reference

(c) interialabs 2002 * coded by Reiner Schug