DrollTroll's Preferred Editor For BasicCAD Scripts

Started by DrollTroll, June 07, 2019, 11:05:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrollTroll

My preferred editor for creating BasicCAD scripts (and pretty much all text editing in general, as opposed to word-processing) is PSPad. It's a free customizable text editor that can be set up for syntax highlighting for almost any programming language. I am deeply indebted to forum user prl for pointing this wonderful tool out to me many years ago.

You can download PSPad for your own use from this location:http://www.pspad.com/en/download.htm
Note that I have no affiliation with the program's author, I am simply a happy user of the product.

Once you've downloaded and installed PSPad, you might want to create some BasicCAD scripts. You can do that out-of-the-box, as it were, but PSPad has no built-in syntax highlighting for BasicCAD, which is its own rather peculiar language. Fortunately, I have already created the necessary settings for BasicCAD syntax highlighting. To use it, follow these steps:

1) Locate the folder where you have installed PSPad. If you have a desktop shortcut for it, you can right-click on the icon and choose 'Properties'. Click on the 'Shortcut' tab and choose 'Open File Location' (at least you can do this in Windows 10 -- I don't recall if this option is available in older Windows versions, sorry). This will open the folder containing the PSPad program.

2) Download the attached BasicCAD.ini file, and store it in the PSPad sub-folder 'Syntax'.

3) Start PSPad. From the menu, choose Settings/Highlighter Settings, and check the box for 'BasicCAD' (it will be located beneath 'x86 Assembly'). Now when this highlighter is active, you can view, edit, and save BasicCAD scripts with syntax highlighting.


4) If you want to use the same color scheme that I do, and you ONLY use PSPad for editing BasicCAD and plain text, you can also use the attached PSPad.ini file. Close PSPad, download the ini file to the PSPad folder located in step 1, and re-start PSPad. Now your BasicCAD scripts will use the same syntax colors that mine have. Note that overwriting your existing PSPad.ini file will undo any custom color settings you may have made for other languages. If you just do plain text and BasicCAD, it shouldn't have any adverse effects at all.

'What is syntax highlighting?', you may be wondering. Let's say you are working on a BasicCAD script, and you are entering one of the main keywords for the BasicCAD language, such as GETATTR. When you type that in at the beginning of a line, syntax editing will color the word bold and black. If you misspelled it, say as 'GETATR', it won't highlight in bold and you'll realize you mis-typed something. I have set up different types of keywords to have different colors, so that comments are bright green and italic, main statements are bold black, drawing commands are a brown color, drawing parameters are a more reddish brown, variable names are blue, numbers are cyan, and strings are an underlined olive drab color.

If you don't like my color scheme, of course, you can always change it by going to Settings/Highlighter Settings, making sure 'BasicCAD' is the highlighted entry on the left, and click on different categories in the center panel (i.e. Comment, Identifier, etc.) and changing the font properties on the right.
25 years with DesignCAD

jilani