Page 1 of 1

Commenting a script

Posted: Tue Oct 18, 2022 2:29 pm
by ebulerdo
Hi! I usually edit my scripts with a text editor. In the old TextCrawl format I used to comment some lines at the beginning to add a brief explanation and instructions. For example:

// Numbers to months
// This script converts numbers to months. E.g. #01 to January
// Make sure to use UTF8 enconding.

How can I do something similar in the current format? I know how to comment a command using the <comments> tag, but how can I comment at the beginning of the script? Thanks!

Re: Commenting a script

Posted: Wed Oct 19, 2022 10:34 am
by DigitalVolcano
The files are in XML format, so you can use XML comments:

Code: Select all

<?xml version="1.0" encoding="utf-16"?>
<!--Your comment-->
<TextCrawlerBatch Version="3.0">
  <command name="SubFoldersOn" enabled="True" />
  <command name="FindRep" enabled="True">
........
Note that you have to have the <?xml.. declaration as the first line else it won't load. The comments will be lost if you re-save it from TextCrawler!

Re: Commenting a script

Posted: Fri Oct 21, 2022 9:40 am
by ebulerdo
Thanks! That's exactly what I need.