This script can be useful in case you want create or edit thinBasic scripts with other editors but keep syntax highlight possibility.
Usually every editor featuring syntax highligh has some kind of files where to store keywords or other specific language features.

Just modify this script to follow your editor syntax highlight file rules and you go. Every time we update thinBasic with new keywords or equates this script will output all the new features. Which other scripting or compiled language gives you this option?


[code=thinbasic] '---Load all modules in order to get all keywords
#INCLUDE "%APP_INCLUDEPATH%\thinbasic_GL.inc"
#INCLUDE "%APP_INCLUDEPATH%\thinbasic_GLU.inc"
#include "%APP_INCLUDEPATH%\ODBC352.INC"

uses "BIFF"
uses "CGI"
uses "Console"
uses "Crypto"
uses "File"
uses "DT"
uses "FTP"
uses "INet"
uses "INI"
uses "LL"
uses "MATH"
uses "OS"
uses "PC"
uses "RAS"
uses "Registry"
uses "SAPI"
uses "SMTP"
uses "TcpUdp"
uses "XML"
uses "ZLib"
uses "UI"
uses "TBGL"
uses "COM"
uses "tokenizer"
uses "stat"
uses "TBASS"
uses "Eval"
USES "TBDI"


DIM sKeys AS STRING
DIM aKeys() AS STRING
DIM nKeys AS LONG
DIM Count AS LONG
DIM sOut AS STRING

'---Get a string with equates separated by $TAB
sKeys = APP_ListEquates

'---Parse string into an array
PARSE sKeys, aKeys, $TAB

'---Creates output buffer with equates
nKeys = UBOUND(aKeys(1))
FOR Count = 1 TO nKeys
sOut = sOut & aKeys(Count) & $CRLF
NEXT


'---Get a string with keywords separated by $TAB
sKeys = APP_ListKeywords & $tab & APP_ListFunctions

'---Parse string into an array
PARSE sKeys, aKeys, $TAB

'---Creates output buffer with keywords and functions
nKeys = UBOUND(aKeys(1))
FOR Count = 1 TO nKeys
if aKeys(Count) = "" then iterate for
IF aKeys(Count) <> "REM" THEN
sOut = sOut & aKeys(Count) & $CRLF
END IF
NEXT

'---Save buffer into .txt file
File_Save(app_sourcepath & "thinBasic_KeyWords.txt", sOut)
MSGBOX 0, app_sourcepath & "thinBasic_KeyWords.txt file created!"

[/code]