// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! 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,yp,count,ok; string experlist,expername,str_from[],str_to[],st,field; float lastvl,vl1,vl2; DIALOG dlg; for i=1 to DbGetExperCount do if DbGetExperClass(i)="FPR" then { if expername="" then expername=DbGetExperName(i); experlist=experlist+DbGetExperName(i)+" "; } if expername="" then { message("There are no fingerprint type experiments present!"); stop; } DlgAddText(dlg,"Select the fingerprint type",15,15,150,15); DlgAddList(dlg,experlist,expername,15,35,150,150,"LIST"); if not(DlgShow(dlg,"Set active zones",290,220)) then stop; DlgReset(dlg); count=7; st=CmpGetSett(expername); while st<>"" do { field=splitstring(st," "); if splitstring(field,"=")="zones" then { i=0; while field<>"" do { i=i+1; str_from[i]=splitstring(field,"-"); str_to[i]=splitstring(field,","); } } } for i=1 to count do { yp=0+27*i; DlgAddText(dlg,"from",15,yp,30,15); DlgAddEdit(dlg,str_from[i],50,yp-1,40,18); DlgAddText(dlg,"% to",95,yp,40,15); DlgAddEdit(dlg,str_to[i],140,yp-1,40,18); DlgAddText(dlg,"%",185,yp,20,15); } ok=0; while not(ok) do { if not(DlgShow(dlg,"Set active zones",320,250)) then stop; ok=1; field="";lastvl=0; for i=1 to count do { if (str_from[i]<>"") or (str_to[i]<>"") then { vl1=str_from[i];vl2=str_to[i]; if (vl2<=vl1) or (vl1100) then ok=0; lastvl=vl2; if field<>"" then field=field+","; field=field+str(vl1,0,2)+"-"+str(vl2,0,2); } } if ok then CmpSetSett(expername,"zones="+field); else message("Error: invalid value(s)"); }