// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! 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,selcount,todel,removedcount; DIALOG dlg; selcount=0; for i=1 to DbGetEntryCount do if DbGetSel(DbGetEntryKey(i)) then selcount=selcount+1; if selcount<=0 then { message("ERROR: there are no entries selected"); stop; } DlgAddText(dlg,"This script will remove all selected entries.",15,15,230,15); DlgAddText(dlg,"("+str(selcount,0,0)+" in total). OK to proceed?",15,30,200,15); if not(DlgShow(dlg,"Confirmation",350,120)) then stop; i=1;removedcount=0; setbusy("Removed: 0"); while i<= DbGetentrycount do { todel=0; if DbGetSel(DbGetEntryKey(i)) then todel=1; if todel then { DbDelEntry(DbGetEntryKey(i)); removedcount=removedcount+1; if floor(removedcount/10)=removedcount/10 then setbusy("Removed: "+str(removedcount,0,0)); } if not(todel) then i=i+1; } setbusy("");