Is anyone using PSpad for NFO editing?

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Is anyone using PSpad for NFO editing?

Post by AndersI »

I just took a quick look at the free PSpad text editor (http://www.pspad.com/en/) and it seems there are quite a lot of possibilities in that editor.

The syntax coloring plus the Clips, Interactive Clips and Scripts seems like a good foundation for a specialized NFO text editor. It also seems quite possible to start grfcodec (and other programs, like NFOrenum) from inside the editor, in effect creating an IDE (Integrated Development Environment) for NFO.

Is anyone already using it for NFO editing? Has anyone created any macros/clips/scripts to ease NFO editing?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Is anyone using PSpad for NFO editing?

Post by Zephyris »

I havn't had any experience with PSPad, but what you are suggesting is very promising, especially features like 1 click renumbering/encoding and syntax highlighting.
I have tried a similar thing with Notepad++, but didn't get very far. I (just about) got it recognising some different actions, but I really struggled with more useful features like highlighting the vehicle ID in each action - does PSPad have good support for contextual highlighting?
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by minime »

I use it - the highlighting and autocompletion are handy, but I didn't bother trying to integrate other apps into it... running make from a shell is just as convenient.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by AndersI »

Zephyris wrote: but I really struggled with more useful features like highlighting the vehicle ID in each action - does PSPad have good support for contextual highlighting?
Yes and no. It has built in parsers for a lot of languages, but there's no plugin system for new parsers. So forget the highlighting of vehicle ID. You can configure colors for the 'standard' parser (four categories of reserved words, numbers, comments, special chars and 'the rest'). Doesn't really work for hex numbers without special markers, though.

I've got the external programs working now, so I can edit the NFO, one click runs NFORenum on the current file, one click more reloads the fixed file. Grfcodec is set up as the compiler, and that part works one-click too.

Took a look at the Interactive Clips - I can set up a macro that shows a dialog with edit boxes, combo boxes, image file dialogs etc. that ends up generating the beginning of an Action1.

But... The clips macros have no support for variables or conditionals, so the combo boxes and edit boxes can only show/enter the exact text that should be put in the NFO - not much gained, unfortunately.

Next I will study the scripting a bit, but it really looks like it would be easier to write something directly in Delphi, rather than try to work around limitations in PSPad macros and scripts. There is a free editor control - SynEdit - available for Delphi (actually, PSPad is built around it) so getting something equal to Notepad up and running should only take ten minutes, then I could start thinking about the coloring parser...
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by michael blunck »

I´m using it (besides notepad++ and some other editors/tools).

IMO, best thing in PSpad is the possibility to have "projects", i.e. sets of data files which you may organize and edit as a whole, e.g. text search & exchange in all project files in one click. All in all, it´s a powerful tool, but a little bit cluttered, IMO.

Well, colouring ... Except from highlighting comments, that´s more or less useless for .nfo, don´t you think?

regards
Michael
Image
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by minime »

Well, my code uses a lot of macros, and it comes in handy with that (see picture).

The projects part is really handy, since I can organize all the files that the source code consists of.
Attachments
pspad_grf.png
pspad_grf.png (39.96 KiB) Viewed 292 times
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by AndersI »

What macro pre-processor are you using?
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Re: Is anyone using PSpad for NFO editing?

Post by minime »

Custom one, that I've cobbled together some time ago for just this purpose. There's also an accompanying library of macros.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 21 guests