'------------------------------------------------------------------------------------ ' ** Picture Title & Comment script for MyAlbum - by Edward Bean. ** ' ' InfoBox - Displays a message box containing the title and full comment of the ' selected picture. ' ' Once in place, this script can be activated either manually ' by a function key assigned in Tools/Customize menu, or automatically ' via the Play field in Picture Information (F7) ' ' This example displays the Full Comment plus a Custom Field named "Title" ' although, with simple modification, any other field(s) could be displayed. '------------------------------------------------------------------------------------ Option Explicit app.ClearTrace dim alb, pic, c, s, t, i set alb = app.GetCurrentAlbum ' Get logical picture number i.e. number within selected set i = alb.nCurrentPicture ' Convert logical picture number to absolute i = alb.CvtNumPic( i, 1 ) ' Get picture object set pic = alb.GetPicture(i) ' Get the Title string and remove leading/trailing spaces t = trim ( pic.GetCustomField("Title") ) ' Get the Comment string and remove leading/trailing spaces c = trim ( pic.sComment ) ' Build the string for display s = t & chr(13) &chr(13) & c ' Check that there is something to display if trim( t & c ) <> "" then ' Display text in a message box MsgBox s, vbOKOnly, "" end if