Here's another way to do it with script commands:
// Identify all unidentified items
getinventorylist;
for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i +1 ) {
if ( @inventorylist_identify[.@i] == 1 ) continue;
delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
getitem @inventorylist_id[.@i],1;
set .@count, .@count +1;
}
if (.@count) dispbottom .@count +" items identified.";