Tips & Trix
Edit PUB source code with Find & Replace

Home
PUBz
Grafx Pax
Tips & Trix
Neo-Linx
Neo-Talk
Neo-Filez
Search NeoDezign
 
 
 

 


Have you ever been working on a large program and found that, for whatever reason, you need to change a path statement, filename, or a variable name throughout your entire project? Buttons, Actions, Text Edit boxes... they all have the wrong commands!! You have to meticulously go page by page, object by object changing everything to the new command...

For instance, let's say I have a program that mistakingly has full path statements to external data files and they look like this...

C:\Program Files\NeoBook for Windows\MyProg\Data.dat

...and I want to replace this path statement with...

[PubDir]Data.dat

I might have to painstakingly go through my entire project to change every one of these! 

There is an easier way.  .PUB files are actually just ASCII text documents. You can open a .PUB in any text editor. Since Notepad has a filesize limit and no Replace function you can use WordPad to open your .PUB file. Make sure you close your PUB in NeoBook before you begin editing the PUB source file!

Highlight the text that you want to replace then from the menubar select Edit > Replace. The highlighted text should appear in the "Find what:" box. Type into "Replace with" the text that need to change it to. Then, press the "Replace All" button.

When you save the PUB WordPad will display a dialog box that says, "You are about to save the document in Text-Only format, which will remove all formatting". Make certain that you press the "Text Document" button.

Now, re-open the PUB in NeoBook and you should be on your way.