' ------------------------------------------------------------------------------------ ' PicWithoutKW.vbs ' This script selects the pictures in the current album that have no keyword assigned ' ------------------------------------------------------------------------------------ Option Explicit app.ClearTrace dim alb set alb = app.GetCurrentAlbum dim i, j, nbPic, kw ' Get the keywords dim nbKW, tabKW() nbKW = alb.nbKeyword app.Trace "Album has " & nbKW & " keywords" redim tabKW(nbKW) for i = 0 to nbKW-1 set kw = alb.getKeyword(i) tabKW(i) = kw.sName next ' Process each picture nbPic = alb.nbPicture app.Trace "Pictures to process: " & nbPic dim pic, bHasKW for i = 0 to nbPic-1 Set pic = alb.GetPicture(i) bHasKW = False for j = 0 to nbKW-1 if pic.HasKeyword( tabKW(j) ) then bHasKW = true next if not bHasKW then pic.bSelected = True next alb.Redraw app.Trace "Done !"