IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Page 1 of 2 1 2 >
Topic Options
#46337 - 01/07/14 04:55 PM search and replace
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
Hi, can someone help me to get this right please.
I get data that names always moves on the page they are not on the same location. like below.

Fist Name David
Last Name John

I need to search for the "First Name" on the page and store the entire line on a variable
I also need to search for the "Last Name" on the page and store the entire line on the second variable

Than I need to remove these two lines because they are on the wrong location.

Then I need to print the two variable on the correct position on the page.

Your help is appreciated.

Thanks

Top
#46350 - 01/08/14 10:41 AM Re: search and replace [Re: Walli]
cosimo Offline
OL Expert

Registered: 10/31/01
Posts: 1286
Loc: montreal
Hi,

Please open a support request via the web and include your document and data and someone will take a look and point you in the right direction.

Thanks
Cosimo

Top
#46353 - 01/08/14 11:46 AM Re: search and replace [Re: Walli]
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
Thanks

Top
#46359 - 01/08/14 02:11 PM Re: search and replace [Re: Walli]
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
I'm stuck here, Can someone help me to write a vb-script to search for a string "walli" on a line, could be on line 20 or anywhere on the data page, and store the entire line result on a variable and replace the initial value by "". thanks


Edited by Walli (01/08/14 02:13 PM)

Top
#46360 - 01/08/14 02:54 PM Re: search and replace [Re: Walli]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Walli,

Do you want a vb-script or a PPtalk script? (since this is the PlanetPress Design forum, I assume you want the latter)
Also, have you opened a support request via the web as Cosimo suggested?

Trying to help you through this forum is going to be very time consuming for everyone since you didn't provide any relevant info.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#46361 - 01/08/14 02:54 PM Re: search and replace [Re: Walli]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi Walli,

Did you open a support ticket as Cosimo suggested, so that Support can look at this with you?

Also, please note that custom scripts are not officially supported. We sometimes post some examples here if we already have something or if we have time to do them(usually when they're not big scripts), but this isn't something you can just request like this, unless you pay for professional services. I would advise that you search through the various examples already posted on the newsgroup, I'm pretty sure codes that do this or at least similar operations have been posted before. You can use those as a starting point, and go from there.

Regards,
Raphaël Lalonde Lefebvre

Top
#46362 - 01/08/14 02:56 PM Re: search and replace [Re: Walli]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Beat you to it, Raph! smile
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#46363 - 01/08/14 02:59 PM Re: search and replace [Re: Walli]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Don't worry, I'll beat you to it next time! cool

Top
#46364 - 01/08/14 03:08 PM Re: search and replace [Re: Walli]
Walli Offline
OL Expert

Registered: 02/13/13
Posts: 320
Loc: Ontario
Hi Guys, YES I got the support team to help me to search for the string and save the entire line info into a variable and use it but I need a little bit more help to replace the original string
to " " because it's not needed anymore. I'm using the variable value instead.
Any suggestions please.

The reason why I got this here and with support is because the job is urgent. thanks for your support.

Thanks.


Edited by Walli (01/08/14 03:09 PM)

Top
#46365 - 01/08/14 03:12 PM Re: search and replace [Re: Walli]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi Walli,

You do not actually need a script for this. A simple solution is to use a process where you capture your data, then use an In-Stream Splitter to split it on every lines. Make a condition to check if this line corresponds to what you're looking for. If the condition is True, then in the true branch, make a Create File with a line with just a space on it, then use a Send to Folder that will use a static file name and the "concatenate" files option. Do not put anything in the "Separator string" field. And if the condition is False, then just use a Send to Folder with the concatenate option with the same file name.

You essentially rebuild your file, but the line you're looking for will be replaced by a space.

Regards,
Raphaël Lalonde Lefebvre

Top
Page 1 of 2 1 2 >