Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Erik Gomez
  Where is Erik Gomez?
 Victorias City, Negros Occidental
 Philippines
 Erik Gomez
 To: rose cruz
  Where is rose cruz?
 navotas
 Philippines
 rose cruz
 Tags
Subject: RE: Scan and Replace Script/Produre
Thread ID: 228723 Message ID: 228742 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Thursday, May 21, 2009 8:39:21 AM         
   


> > hi,
> >
> > how about
Strtran()

> >
> > hth,
> > Erik Gomez
> > www.foxite.com - The Home of The Visual FoxPro Experts
> > Personal Weblog
> > My Other Blog
>
>
> Yes, it can help but I need to scan the whole Form or PRG to search one word and replace it.
>
> Thanks...
hi,

if you really want by code try this
for a PRG you can use FileToStr() and Strtran()
lcFile = "C:\Temp\MyProg.Prg"
lcStr = FileToStr(lcFile)
? Strtran(lcStr,cMySearchString,cReplacement)


as for forms you need to open the scx file as a table and look at the Methods field, this should contain the code for the different events/methods pf each object on the form and the form itself. then use Strtran() but i won't recommend this as this is a hack. you still have to open the form normally and save it so that the code in the Methods field will be compiled to the Objcode. i strongly don't recommend this. be sure to take a back-up of your forms/project. good luck.

hth,
Erik Gomez
www.foxite.com - The Home of The Visual FoxPro Experts
Personal Weblog
My Other Blog

ENTIRE THREAD

Scan and Replace Script/Produre Posted by rose cruz @ 5/21/2009 5:58:11 AM
RE: Scan and Replace Script/Produre Posted by kulwant singh @ 5/21/2009 7:28:00 AM
RE: Scan and Replace Script/Produre Posted by rose cruz @ 5/21/2009 7:58:58 AM
RE: Scan and Replace Script/Produre Posted by Erik Gomez @ 5/21/2009 7:59:47 AM
RE: Scan and Replace Script/Produre Posted by rose cruz @ 5/21/2009 8:03:19 AM
RE: Scan and Replace Script/Produre Posted by Erik Gomez @ 5/21/2009 8:39:21 AM
RE: Scan and Replace Script/Produre Posted by tushar @ 5/21/2009 8:42:36 AM