'-------------------------------------------------------------------------- ' FlagPicturesWithoutComment.vbs ' Flag all the pictures in the current album that have en empty comment. ' The flag is also cleared for the pictures with comment defined. '-------------------------------------------------------------------------- Option Explicit ' Define the variables Dim alb, nb, i, pic, nbF nbF = 0 const STATE_FLAGGED=&h20000 set alb = app.GetCurrentAlbum nb = alb.nbPicture for i=0 to nb-1 Set pic = alb.GetPicture(i) if trim(pic.sComment) = "" then pic.lStatus = pic.lStatus or STATE_FLAGGED nbF = nbF + 1 else pic.lStatus = pic.lStatus and not STATE_FLAGGED end if next alb.ReDraw app.Trace nbF & " pictures without comment" app.StatusBarText = nbF & " pictures without comment"