View unanswered posts | View active topics It is currently Tue Nov 21, 2017 9:08 pm



Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
 Script Editor? 
Author Message
Lieutenant Commander
User avatar

Joined: Sun Jan 29, 2006 3:00 am
Posts: 777
Location: Iowa
Unread post Re: Script Editor?
Re: WaitFor (#179 & "Turns")
Darn handy idea!

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

Thx guys! <subscribe>

_________________
#+++
The early bird may get the worm, but the second mouse gets the cheese.
#---


Last edited by Crosby on Sat Jan 26, 2008 8:19 pm, edited 1 time in total.



Sat Jan 26, 2008 10:39 am
Profile ICQ YIM
Lieutenant Commander
User avatar

Joined: Thu Mar 21, 2002 3:00 am
Posts: 890
Location: USA
Unread post Re: Script Editor?
Work in progress, but not my work.

_________________
http://tw-cabal.navhaz.com - THE TW info site

Man, I gotta quit showing up here...next thing you know i'll get dragged back in.


Sat Jan 26, 2008 11:48 am
Profile WWW
Ensign
User avatar

Joined: Tue Jul 21, 2009 2:37 pm
Posts: 230
Location: Ottawa, Canada
Unread post 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 2969 times ]

_________________
- Astrochimp (aka Hotblack Desiato)
Sun Sep 13, 2009 11:28 am
Profile
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3367
Location: Los Angeles, CA
Unread post Re: Script Editor?
Do a search for the TWXIDE by EP.

Helix

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Getting (re)started in TradeWars? Time to update the package, its been 3 years.
Lest we forget


Sun Sep 13, 2009 12:22 pm
Profile WWW
Ensign
User avatar

Joined: Tue Jul 21, 2009 2:37 pm
Posts: 230
Location: Ottawa, Canada
Unread post 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.

_________________
- Astrochimp (aka Hotblack Desiato)


Sun Sep 13, 2009 12:34 pm
Profile
Commander
User avatar

Joined: Fri Aug 20, 2004 2:00 am
Posts: 1800
Location: Outer Rims
Unread post 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.

_________________
-Thrawn

But risk has always been an inescapable part of warfare.

--

Knight to Queen's Bishop 3


Sun Sep 13, 2009 12:38 pm
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1106
Location: Augusta, GA
Unread post 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+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Sun Sep 13, 2009 6:28 pm
Profile WWW
Ensign
User avatar

Joined: Tue Jul 21, 2009 2:37 pm
Posts: 230
Location: Ottawa, Canada
Unread post 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

_________________
- Astrochimp (aka Hotblack Desiato)


Mon Sep 14, 2009 9:46 am
Profile
Ensign
User avatar

Joined: Tue Jul 21, 2009 2:37 pm
Posts: 230
Location: Ottawa, Canada
Unread post 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?

_________________
- Astrochimp (aka Hotblack Desiato)


Mon Sep 14, 2009 1:24 pm
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1106
Location: Augusta, GA
Unread post 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.

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Mon Sep 14, 2009 2:19 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3367
Location: Los Angeles, CA
Unread post Re: Script Editor?
Bump.... Any plans on an TWXIDE update?

H

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Getting (re)started in TradeWars? Time to update the package, its been 3 years.
Lest we forget


Thu Nov 04, 2010 3:52 am
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 259
Unread post 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


Sun May 08, 2011 5:31 am
Profile
Chief Warrant Officer
User avatar

Joined: Mon Dec 26, 2011 8:41 am
Posts: 199
Unread post 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 93 times
Tue Sep 17, 2013 7:04 pm
Profile ICQ
Chief Warrant Officer
User avatar

Joined: Mon Dec 26, 2011 8:41 am
Posts: 199
Unread post 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 2391 times ]



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


Sun Sep 29, 2013 1:40 pm
Profile ICQ
Chief Warrant Officer
User avatar

Joined: Sat Feb 27, 2016 1:01 am
Posts: 146
Location: Molon Labe
Unread post 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 1378 times ]


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

_________________
The object of life is not to be on the side of the majority, but to escape finding one’s self in the ranks of the insane.” — Marcus Aurelius


Mon Mar 07, 2016 10:42 am
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 30 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.