' ------------------------------------------------------------------------------------ ' ChangeFileForThumbnail.vbs ' Use this script to relink a thumbnail to a specific file (for instance in the case ' the file has been renamed outside of MyAlbum. ' Needs MyAlbum 2.2 ' ------------------------------------------------------------------------------------ Option Explicit app.ClearTrace if app.Version > "2.1.1" then Dim alb, pic, sExt, sFilter, sNewFile set alb = app.GetCurrentAlbum set pic = alb.GetVisiblePicture( alb.nCurrentPicture ) if not pic is Nothing then sExt = alb.ExpandMacro( pic, "%FE" ) sFilter = UCase( sExt ) & " Files(*." & sExt & ")|*." & sExt & "|All files (*.*)|*.*||" 'app.Trace sFilter sNewFile = app.GetFilename( "Select the new file for this picture", 0, "", sFilter, 0 ) if sNewFile <> "" then pic.sFileName = sNewFile alb.Saved = False alb.Redraw end if end if else app.Trace "You need a more recent version of MyAlbum to run this script !" end if app.Trace "Done !", -1, TRACE_GREENDOT