'------------------------------------------------------------- ' PictureDelay.vbs ' List for each picture in the album its display time ' or ' Reset the display time for all the pictures in the album '------------------------------------------------------------- Option Explicit ' Some constants... const ValClear = &hffff ' = use album-level value dim alb, nb, pic, s, i, text, n, k, d, bClear app.ClearTrace set alb = app.GetCurrentAlbum if alb is Nothing then app.Trace "No album, exiting!" else nb = alb.nbVisiblePicture if nb = 0 then app.Trace "No pictures, exiting!" else s = "Picture delay." & vbCRLF & "Do you want to:" & vbCRLF & " clear the delay," & vbCRLF & " list the values ?" bClear = (vbYes = MsgBox( s, vbYesNo or vbQuestion, "PictureDelay" )) App.Trace "Pictures in this album: " & nb if bClear then App.Trace " Clearing the delay for all the displayed pictures..." for i = 0 to nb-1 set pic = alb.GetVisiblePicture( i ) if bClear then ' The delay is in the lower WORD of the lTransition property d = (pic.lTransition and &hffff0000) + ValClear pic.lTransition = d else d = pic.lTransition and 65535 if d = 65535 then s = "" else d = d / 10. s = d & " s" end if text = (i+1) & vbTab & pic.sShortFileName & vbTab ' Trying to align the columns... n = len(pic.sShortFileName) for k = 0 to 2 - n/10 text = text & vbTab next App.Trace text & s end if next ' Set the modified flag for the album if we have modified the delays if bClear then alb.Saved = False App.Trace "Done !" end if end if