' ------------------------------------------------------------------------------------ ' SetPhotographer.vbs ' This script will scan the current album and will set the "Photographer" ' custom field to a predefined string if the field is not already defined. ' ------------------------------------------------------------------------------------ Option Explicit const sCField = "Photographer" const sString = "I took this picture !" app.ClearTrace dim alb, i, nb, pic set alb = app.GetCurrentAlbum nb = alb.nbVisiblePicture app.Trace nb & " pictures to process in album " & alb.Name For i = 0 To nb-1 Set pic = alb.GetVisiblePicture(i) if pic.GetCustomField( sCField ) = "" then pic.SetCustomField sCField, sString end if next app.Trace "Done!!!" alb.Redraw