'------------------------------------------------ ' TestStamp.vbs ' Test script for "stamping". ' The selected picture will be stamped with a ' text and placed in the TEMP folder. '------------------------------------------------ Option Explicit Const TemporaryFolder = 2 app.clearTrace dim alb, pic, i, n, filename, newFile, fso, tempfolder, nFileType, k set alb = app.GetCurrentAlbum n = alb.NbPicture Set fso = CreateObject("Scripting.FileSystemObject") dim bStampText bStampText = True k = 0 for i = 0 to n-1 Set pic = alb.GetPicture(i) if pic.bSelected then filename = pic.sShortFileName ' Get a temporary file Set tempfolder = fso.GetSpecialFolder( TemporaryFolder ) 'newFile = "c:\temp" & "\" & filename newFile = tempfolder.Path & "\" & filename app.Trace " Processing picture #" & i+1 & " " & filename & " --> " & newFile ' Get the type of the source file nFileType = pic.lStatus and &HFF if bStampText then pic.SetTextStampInfo "MyAlbum %MV", "Arial,-32,0,700,0,0,0", 255, 10, -10 else pic.SetPictureStampInfo "D:\WINDOWS\SDK\MyAlbum\Distrib\Temple5.jpg", 10, -10 end if pic.ConvertAndResize newFile, nFileType, 0, 0 k = k + 1 end if next app.Trace "Done ! " & k & " pictures processed" alb.Redraw