' ------------------------------------------------------------------------------------ ' CopyComents.vbs ' Copy picture comments from one album to another. Two albums must be open in MyAlbum. ' The script will check each picture in the first album: if the picture comment is ' empty, check if the picture is present also in the second album and gets its comment. ' ------------------------------------------------------------------------------------ Option Explicit app.ClearTrace ' Define the variables dim alb1, alb2, nb, i, pic, pic2 set alb1 = app.GetAlbum(1) set alb2 = app.GetAlbum(0) app.Trace "Album 1: " & alb1.Name app.Trace "Album 2: " & alb2.Name nb = alb1.nbPicture app.Trace "Pictures in this album: " & nb, -1, TRACE_INFORMATION for i=0 to nb-1 Set pic = alb1.GetPicture(i) app.trace pic.sShortFileName & " - " & pic.sCommentFirstLine if pic.sComment <> "" then set pic2 = alb2.GetPictureByFileName( pic.sShortFileName ) if not pic is Nothing then pic2.sComment = pic.sComment end if next alb1.redraw app.Trace "Done !", -1, TRACE_OK