Find and Replace VALUE with STRING? What the he** am I sayin

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Find and Replace VALUE with STRING? What the he** am I sayin

Post by stevef22 »

How would you insert a string of numbers into a set value. For example. I have to manually code this java applet because at work we dont support server technology (Whole different story.) I am using PARAM Names to pass values into my applet.

How do I speed up the process to replace my "X" with a sting. I have the Excel spreadsheet w/ the numbers and values.

See in my picture and code how I started inserting the values 1.2.3... Well I have about 1000 of these to pass to the bar graph applet. Argh~!

How would I automatically insert a number in consecutive order to build the PARAM names faster?


Code: Select all

<PARAM name="val_1" value="36656">
<PARAM name="description_1" value="201">
<PARAM name="color_1" value="30,70,170">

<PARAM name="val_2" value="38218">
<PARAM name="description_2" value="203">
<PARAM name="color_2" value="30,70,170">

<PARAM name="val_3" value="34391">
<PARAM name="description_3" value="204">
<PARAM name="color_3" value="30,70,170">

<PARAM name="val_X" value="34391">
<PARAM name="description_X" value="204">
<PARAM name="color_X" value="30,70,170">

<PARAM name="val_X" value="34391">
<PARAM name="description_X" value="204">
<PARAM name="color_X" value="30,70,170">

<PARAM name="val_X" value="34391">
<PARAM name="description_X" value="204">
<PARAM name="color_X" value="30,70,170">

<PARAM name="val_X" value="34391">
<PARAM name="description_X" value="204">
<PARAM name="color_X" value="30,70,170">

Image
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

The "val_X" is easy, check out TP's help under "How to Generate Sequence Numbers". Inserting data from another file is a diffrent matter, I would imagine creating a macro which would have to swap between open documents and so on. Hardly worth the effort IMHO, reccomend using a scripting language program like Perl/Python/Ruby etc for that. HTH
Then I open up and see
the person fumbling here is me
a different way to be
stevef22
Posts: 10
Joined: Mon Oct 10, 2005 8:14 pm

Thanks,

Post by stevef22 »

Thanks, I will try this.
Post Reply