// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! 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,j,sel,selct; string key,experID; DIALOG dlg; selct=0; for i=1 to DbGetEntryCount do if DbGetSel(DbGetEntryKey(i)) then selct=selct+1; if selct=0 then { message("There are currently no entries selected!"); stop; } DlgAddText(dlg,"There are currently "+str(selct,0,0)+" entries selected",15,15,250,15); DlgAddText(dlg,"Are you sure you want to remove all these entries",15,32,250,15); DlgAddText(dlg,"and the corresponding experiment information?",15,47,250,15); DlgAddButton(dlg,"No",12,150,80,80,25); DlgAddButton(dlg,"Yes",11,30,80,80,25); i=DlgShow(dlg,"CONFIRMATION",300,150); if i<>11 then stop; sleep(500); DlgReset(dlg); DlgAddText(dlg,"WARNING: PRESSING 'YES' WILL PERMANENTLY REMOVE",15,15,250,15); DlgAddText(dlg,"THESE DATA FROM YOUR COMPUTER !",15,32,250,15); DlgAddText(dlg,"OK to proceed?",15,70,250,15); DlgAddButton(dlg,"No",12,30,120,80,25); DlgAddButton(dlg,"Yes",11,150,120,80,25); i=DlgShow(dlg,"SECOND CONFIRMATION",300,190); if i<>11 then stop; i=1; while i<=DbGetEntryCount do { key=DbGetEntryKey(i); sel=DbGetSel(key); if sel then { for j=1 to DbGetExperCount do { experID=DbGetEntryLink(key,DbGetExperName(j)); if length(experID)>0 then { DbSetExperLink(experID,""); if (DbGetExperClass(j)="CHR") or (DbGetExperClass(j)="SEQ") then { DbDelExper(experID); } } } DbDelEntry(key); } if not(sel) then i=i+1; }