Twistpad Carthago Software forums / Twistpad /  

 A small bug

 
Ayush
Member
#1 | Posted: 19 Jan 2007 23:12 | Edited by: Ayush 
Twistpad recognizes <script> tags in HTML docs (that is great!) but the problem is if i am using VBScript and use ' to comment, TPad starts coloring everything after that(even on next line) until it sees another '. SO the problem is it doesn't recognize ' as a line comment, it thinks it is starting of a string ! One more problem is, inside script tags, the syntax highlighting is for JScript+VBscript not just the scripting language i am using. Why is that ?

Andre Santos
Carthago
Moderator
#2 | Posted: 20 Jan 2007 09:19 
Hi,

That is a known limitation, the HTML syntax can only either support Javacript or VBscript and by default supports Javascript.

Let me know if you need help editing the HTML syntax to support VBScript.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Ayush
Member
#3 | Posted: 21 Jan 2007 15:22 | Edited by: Ayush 
Andre Santos wrote:
Let me know if you need help editing the HTML syntax to support VBScript.



yes, please..

Andre Santos
Carthago
Moderator
#4 | Posted: 22 Jan 2007 15:16 
You need to open the HTML syntax file.
View - Preferences - Syntax and double click on the HTML type.
That should have opened the HTML Syntax file.
Close the properties dialog .

Locate and edit the [ssScriptsComment] header
(Replace by the code below):

[ssScriptsComment]
Type=startstop
Context=8
Priority=9
Scope=4
WholeWordOnly=0
first='
last=
Background=default
Foreground=008000

Locate and delete the following headers:

[ssScriptsString2]

[ssScriptsMultilinecomment]

[ssScriptsBrackets]

[ssStyleBrack]

Replace the [kScriptKeywords] with the one below:

[kScriptKeywords]
Type=keyword
Context=103
Scope=4
Priority=8
WholeWordOnly=1
Keyword1=And;As;Boolean;ByRef;Byte;ByVal;Call;Case;Class;Const;Currenc y;Debug;Dim;Do;Double;Each;Else;ElseIf;Empty;End;EndIf
Keyword2=Enum;Eqv;Event;Exit;False;For;Function;Get;GoTo;If;Imp;Implem ents;In;Integer;Is;Let;Like;Long;Loop;LSet;Me;Mod;New;
Keyword3=Next;Not;Nothing;Null;On;Option;Optional;Or;ParamArray;Preser ve;Private;Public;Raise;Event;ReDim;Rem;Resume;RSet;
Keyword4=Select;Set;Shared;Single;Static;Stop;Sub;Then;To;True;Type;Ty peOf;Until;Variant;Wend;While;With;Xor;randomize
Background=default
Foreground=0000FF

Save the file, you should now have the HTML files scripts section with VBS syntax

Hope that have helped.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Ayush
Member
#5 | Posted: 26 Jan 2007 09:34 
Andre Santos wrote:

You need to open the HTML syntax file.
View - Preferences - Syntax and double click on the HTML type.
That should have opened the HTML Syntax file.
Close the properties dialog .
...


But what about JScript ? I use both.

Andre Santos
Carthago
Moderator
#6 | Posted: 27 Jan 2007 15:51 
Ayush wrote:
But what about JScript ? I use both.


As stated above, either one kind of language script can be supported at a time, unless some kind of compromise is made. But in this case the string char in Javascript conflict with the VB comment.

Thanks,

André Santos
Carthago Software Support
http://www.carthagosoft.net

Twistpad Carthago Software forums / Twistpad /
 A small bug

Your Reply Click this icon to move up to the quoted message


 
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

  Powered By minibb