// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! This script is provided "as is" by Applied Maths. ! // ! You are free to use and modify this script for your own needs. ! // ! Redistribution or reproduction of the script is prohibited. ! // ! DISCLAIMER: ! // ! Improper use of scripts may corrupt your database. ! // ! Running this script is entirely at your own responsibility. ! // ! Applied Maths accepts no lialibility for any consequences ! // ! resulting from its use. ! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! integer i,len,maxlen,savefields; string fieldlist,fieldname,char,st; DIALOG dlg; for i=1 to DbGetFieldCount do { fieldlist=fieldlist+DbGetFieldName(i)+" "; if length(fieldname)<=0 then fieldname=DbGetFieldName(i); } DlgAddText(dlg,"Select field to modify",20,20,150,15); DlgAddList(dlg,fieldlist,fieldname,20,40,150,150,"LIST"); DlgAddCheck(dlg,"Save changes to disk",savefields,15,190,150,15); if not(DlgShow(dlg,"Pad field with spaces",300,250)) then stop; if length(fieldname)<=0 then stop; setbusy("Determining field length - 0"); maxlen=0; for i=1 to DbGetEntryCount do { if floor(i/100)=i/100 then setbusy("Determining field length - "+str(i,0,0)); len=length(DbGetField(DbGetEntryKey(i),fieldname)); if len>maxlen then maxlen=len; } char=" "; setbusy("Padding characters - 0"); for i=1 to DbGetEntryCount do { if floor(i/100)=i/100 then setbusy("Padding characters - "+str(i,0,0)); st=DbGetField(DbGetEntryKey(i),fieldname); while length(st)