www.ClassicTW.com
https://www.classictw.com/

Script Editor?
https://www.classictw.com/viewtopic.php?f=15&t=20271
Page 2 of 3

Author:  Crosby [ Sat Jan 26, 2008 10:39 am ]
Post subject:  Re: Script Editor?

Re: WaitFor (#179 & "Turns")
Darn handy idea!

Re: Traitor's mystery editor
work in progress? hmm? hmmm?

Thx guys! <subscribe>

Author:  Traitor [ Sat Jan 26, 2008 11:48 am ]
Post subject:  Re: Script Editor?

Work in progress, but not my work.

Author:  Hotblack Desiato [ Sun Sep 13, 2009 11:28 am ]
Post subject:  Re: Script Editor?

This is kind of an old topic, but I thought I'd resurrect it with my 2cents rather than start a new one.

TWXide is very cool, but I find it gets bogged down editing large files.

So I'm using Notepad++, which I've been using for a while for other things; I find it much better than ConText.... more polished, better features (especially find/replace).

Best of all, it's extremely easy to define your own syntax highlighting.

I could share my syntax highlighter, but seriously it's almost as quick to define it yourself.

Attachments:
2009-09-13_np++.jpg
2009-09-13_np++.jpg [ 361.5 KiB | Viewed 10019 times ]

Author:  Helix [ Sun Sep 13, 2009 12:22 pm ]
Post subject:  Re: Script Editor?

Do a search for the TWXIDE by EP.

Helix

Author:  Hotblack Desiato [ Sun Sep 13, 2009 12:34 pm ]
Post subject:  Re: Script Editor?

Helix wrote:
Do a search for the TWXIDE by EP.
Helix


I mentioned that in my post... guess you missed it... I said I think it's very cool but I find it gets bogged down when editing large files. Inordinately so, in my case.

Author:  Thrawn [ Sun Sep 13, 2009 12:38 pm ]
Post subject:  Re: Script Editor?

Hotblack Desiato wrote:
Helix wrote:
Do a search for the TWXIDE by EP.
Helix


I mentioned that in my post... guess you missed it... I said I think it's very cool but I find it gets bogged down when editing large files. Inordinately so, in my case.


I agree. TWXide is good, but we found it too gets bogged down. Both Daala and I use Notepad ++ as well.

Author:  ElderProphet [ Sun Sep 13, 2009 6:28 pm ]
Post subject:  Re: Script Editor?

Ahaha, consider it a sign that your script is too large, and that you should be separating it by functions into includes :P

For me, TWXIDE is fast enough, but I hate how much memory it consumes. I just hate to see something so simple require so much RAM. I troubleshot this when I was building it, but it is the text editor component that I utilized. It certainly needs a rewrite, but I find it far more useful than generic editors (kinda the benefit of tailoring it to my needs).

+EP+

Author:  Hotblack Desiato [ Mon Sep 14, 2009 9:46 am ]
Post subject:  Re: Script Editor?

ElderProphet wrote:
Ahaha, consider it a sign that your script is too large, and that you should be separating it by functions into includes :P
+EP+


I agree, but unfortunately it's not my script.... :P

Author:  Hotblack Desiato [ Mon Sep 14, 2009 1:24 pm ]
Post subject:  Re: Script Editor?

ElderProphet wrote:
I just hate to see something so simple require so much RAM. I troubleshot this when I was building it, but it is the text editor component that I utilized. It certainly needs a rewrite, but I find it far more useful than generic editors (kinda the benefit of tailoring it to my needs).


I had assumed that the slowness had something to do with the inventory of variables and labels.

Have you looked at Scintilla at all?

Is TWXide open?

Author:  ElderProphet [ Mon Sep 14, 2009 2:19 pm ]
Post subject:  Re: Script Editor?

I did, but I wanted something in c#, so I went with the text editor component of SharpDevelop. You can find the source on google code by googling twxide.

I'm sure the text editor component has been updated since that was released, but I've been happy enough with it that I haven't needed to hack on it in a while.

Author:  Helix [ Thu Nov 04, 2010 3:52 am ]
Post subject:  Re: Script Editor?

Bump.... Any plans on an TWXIDE update?

H

Author:  SteveH_66 [ Sun May 08, 2011 5:31 am ]
Post subject:  Re: Script Editor?

Hotblack Desiato, Just wondering if you could post your syntax highlighter for Notepad ++ ? I have Notepad ++ and don't know how to set up syntax highlighting in it.

For anyone out there that cares to explain it, how is syntax highlighting set up, like in Notepad ++ for example? I used Context a lot back when I was writing scripts, mostly because of it's highlighter as well as line numbering being show (made it easier for debugging scripts, and man mine needed a LOT of debugging :lol: ), and I'm thinking about getting back into it and getting back into playing the game.

Thanks

Author:  Astrochimp [ Tue Sep 17, 2013 7:04 pm ]
Post subject:  Syntax Highlighter for Notepad++ - Re: Script Editor?

SteveH_66 wrote:
Hotblack Desiato, Just wondering if you could post your syntax highlighter for Notepad ++ ? I have Notepad ++ and don't know how to set up syntax highlighting in it.


(EDIT: See my next reply. It has a much better syntax highlighter.)

Sorry I never replied until now; hopefully it's better late than never. I recently had to set mine up again because I couldn't find my old one; next time I can just grab it here.

You define your language in the Npp Language menu. Language -> "Define your language". Then you have to add all the keywords, operators, etc, many of which you can find on the twxproxy script reference (http://www.navhaz.com/files/script.html), but I found it helpful to have a large .ts file loaded while I was defining the language, and then if I noticed any words that weren't highlighted properly I'd just add them.

I'm attaching my current syntax highlighter. To use it i think you use the notepad menu: Language -> "Define your language" -> Import... and find the spot where you put the contents of the attached zip (there's only one file in there).

Unfortunately, I think you'll have to change your general background colour to black, or at least something dark, or it won't look right:
Settings -> Style Configurator...
Language: Global Styles
Style: Default Style
Change the foreground colour to something light (e.g. white) and the background colour to something dark (e.g. black).

You might want to change these Styles as well:
-Current line background
-Selected text colour

If you don't want to change your global styles, the alternative is to go in the User Defined Language wizard after importing my "twx" language, and change all the colours there (e.g. change each black background to white, and each foreground to something that looks good on white).

Also, I haven't added all the features you can see in the above screenshots (for example, the ~ character is not in there yet, so $var~something will all show up in the same colour as the $vars). I might add more later as I do more scripting and if I do I'll try to upload a new version here.

Attachments:
npp-def_twxScripting.zip [1.83 KiB]
Downloaded 527 times

Author:  Astrochimp [ Sun Sep 29, 2013 1:40 pm ]
Post subject:  Re: Syntax Highlighter for Notepad++ - Re: Script Editor?

Astrochimp wrote:
(EDIT: See my next reply. It has a much better syntax highlighter.)


The attached is a lot better:
- Added regions to allow expand/collapse around user-specified areas of script. These are pretty cool. Use #+++ to open a region, and #--- to close a region.
- Ignore case is now ticked, which I had missed in my previous version, meaning keywords will be highlighted properly regardless of case; no need to specify various versions of each keyword by uppercase/lowercase
- white background, so no need to change your global settings (unless you have a black background already, in which case try the attachment in my previous post).

Attachment:
npp-w.jpg
npp-w.jpg [ 151.75 KiB | Viewed 9441 times ]



Attachment:
npp-twx-w.zip [1.8 KiB]
Downloaded 548 times

Author:  Adept [ Mon Mar 07, 2016 10:42 am ]
Post subject:  Re: Script Editor?

Here is a new TWX Proxy theme for Notepad++, “TWX Proxy [Blackboard]”. Enjoy.

(Will also need to, if not already set, enable black (or any dark, gray, brown, or blue, e.g., vim Dark Blue) global background color in Settings, Style Configurator.)

A note on using '//' to make inline comments, it will need a single period at the end to close it out, (e.g., // My comments are here.) I could not figure out any other way to make it color correctly.

Attachment:
twxproxy_blackboard.jpg
twxproxy_blackboard.jpg [ 216.01 KiB | Viewed 8428 times ]


Attachment:
File comment: TWX Proxy [Blackboard] ver. 1
TWX Proxy [Blackboard].zip [2.28 KiB]
Downloaded 481 times

Page 2 of 3 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/