_app.allowyieldonmsg = true aDir = new array() aDir1 = new array() aDir1.dir("*.wfm") for n = 1 to aDir1.size/5 aDir.add(aDir1[n,1]) next nFileCount = 0 for n = 1 to aDir.size cFileIn = aDir[n] cFileOut = "out"+aDir[n] if not file("out"+aDir[n]) nFilecount ++ fIn = new file() fIn.open(cFileIn) fOut = new file() fOut.create(cFileOut,"RW") if n%10 = 0 ??'*' endif do while not fIn.eof() _app.executemessages() cRead = fIn.readln() if 'class'$lower(cRead) and 'of form'$lower(cRead) cRead = stuff(cRead,at('of form',lower(cRead)),7,' of systemtheme_falseCform from systemtheme_false.cfm') fOut.puts(cRead) cRead= ' set procedure to mypb.cc additive' fOut.puts(cRead) elseif 'systemtheme'$lower(cRead) and 'true'$lower(cRead) //will probably never be executed as true is default whch is not streamed out cRead = stuff(cRead,at('true',lower(cRead)),4,'false ') fOut.puts(cRead) elseif 'new pushbutton'$lower(cRead) cRead = stuff(cRead,at('new pushbutton',lower(cRead)),14,'new mypb ') fOut.puts(cRead) elseif 'new grid'$lower(cRead) cRead = stuff(cRead,at('new grid',lower(cRead)),8,'new mygrid ') fOut.puts(cRead) // add other ontrols as necessary with each one in it's own elseif section. else fOut.puts(cRead) endif enddo fIn.close() fOut.close() new file().delete(cFileIn) new file().rename(cFileOut,cFileIn) endif next ? nFileCount+' .wfm files processed'